xcode如何在我的c项目中包含.o文件

时间:2017-08-19 14:02:59

标签: c xcode

我想在xcode中包含一个.o文件,并在我的c项目中使用它 像这样

void mac_fun(); // the fun write in .o file

int main(int argc, const char * argv[]) {
    // insert code here...
    mac_fun();
    printf("Hello, World!\n");
    return 0;
}

我该怎么做?

大家好,如果你现在看到这个页面,我已经解决了这个问题, 只需像这样添加extern

extern  void mac_fun();

希望能帮助解决同样问题的人:)

0 个答案:

没有答案