开发者

Linking in Xcode

开发者 https://www.devze.com 2022-12-13 06:52 出处:网络
How do I make Xcode link object files properly? The file containing \"main\" and all the dependencies compile properly (and I can easily link them in the command line to generate the executable). How

How do I make Xcode link object files properly?

The file containing "main" and all the dependencies compile properly (and I can easily link them in the command line to generate the executable). However, Xcode seems to refuse to do it, resulting in ld errors of "symbol not found".

This is what my current setup looks like. All the dependencies (Calculator, input, etc) are detected and compile properly. The cpp file contains main but fails t开发者_JS百科o be linked to the .o file (generated by the dependencies), resulting in several ld "symbol not found" errors.

Linking in Xcode

Any ideas?


.o's generated by dependencies do not get linked into the including target. In the example above, "Calculator" needs to generate something, generally a static library (.a), that you would then add to the list of libraries to be linked into the project.

0

精彩评论

暂无评论...
验证码 换一张
取 消