开发者

Linking error in Xcode 4

开发者 https://www.devze.com 2023-03-03 19:03 出处:网络
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.

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

精彩评论

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