我想使用命令
使用GCC编译C ++代码func getTestSelectedRecord() {
sharedInstance.database!.open()
var sqlStatement = "SELECT * FROM TEST WHERE ID = 1"
var resultSet: FMResultSet! = sharedInstance.database!.executeQuery(sqlStatement, withArgumentsInArray: nil)
if (resultSet != nil) {
while resultSet.next() {
let getRecordID = resultSet.intForColumn("LOCATIONSELECTED")
NSLog("DatabaseFunctions - TEST - GET - getRecordID = %i", getRecordID)
}
}
sharedInstance.database!.close()
}
代码:
gcc -lstdc++ hello.cpp -o out.a
得到输出:
#include <iostream>
int main()
{
std::cout<<"hello";
return 0;
}