gcc与显式链接

时间:2015-07-26 10:23:46

标签: c++ gcc

我想使用命令

使用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;
}

0 个答案:

没有答案