开发者

Why isn't Xcode building a file in my project

I have a static library project that I inherited from another developer. I added a class to the project and built it. When I include the static lib in another project, the build fails with a symbol not found error for the class that I added.

I looked at the build logs for the static lib project and I noticed that the .m file isn't compiled. The file is clearly visible in Xcode, right next to all of the other class files. Can anyone th开发者_运维问答ink of a reason that the file wouldn't be built? How does Xcode discover the files that it builds?


Make sure the new file is included in the target you're trying to build.

Click on the filename in the left pane of XCode and open the inspector (command-I), then look at the "targets" tab to verify that the target you're building is checked.

If necessary, you can also expand the target (in the left pane) to see the build steps, and drag the file directly into the build step (for example "Compile Sources") where it needs to be.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜