开发者

Linking error in Xcode 4

I know this is a long shot but, I've been having trouble with a linker error that I specifically don't understand. Please refer to the picture below.

Linking error in Xcode 4

The project contains 4 targets. This error points specifically to one target that is开发者_Python百科 a BSD/Shell helper tool written in c.

I'm sorry for being vague, as I don't fully understand what might be the problem. Any suggestions? Thank you.


Usually, this means that the source file that defines main() hasn’t been added to the corresponding target.

Another possible reason is that the source file that contains main() is being compiled for an architecture (e.g. i386 only) but the target/executable specifies a different architecture (e.g. x86_64 only or fat/universal).

One strategy to help with diagnosing this issue is running xcodebuild against your project+target to inspect the commands that are being issued to compile and link the target.

When all else fails, remove the target and add it again.


Did you #include the appropriate files?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜