How Do I get rid of XCode Architecture link errors?
I am building a Maya App in XCode(3.2.6) for the Mac. I am buildi开发者_运维问答ng my own libs that I link to, and additionally I am linking with some Maya libs that are included with the application. Maya is 64-bit, it seems, and when I run file from terminal on one of the dylibs I need to link to it says "64-bit dynamically linked shard library x86_64". That's all fine and I can build all of my projects.
However, I get a ton of warnings that all say something like:
...dylib, file was built for unsupported file format which is not the architecture being linked (i386)
I get one for each lib I am linking to, including the ones I have built. I have a strange suspicion that this warning is a serious one and that it is affecting their usability. Maya is unable to load my top level bundle and I am guessing it is because of this warning. At the very least, it would be nice to get rid of them because, coming from Windows, it sounds very bad. All of my project settings are generally the same for the "Architectures" setting. My "Architectures" is just set to "64-bit Intel" and my "Valid Architectures" is set to "ppc64 x86_64". I previously had my latter argument include more as "i386 ppc ppc64 ppc7400 ppc970 x86_64" but that wasn't working either. I have tried tons of different settings but no luck getting rid of those warnings.
I guess my question is: what determines the "architecture being linked"? Where is the i386 warning coming from? It doesn't seem to be a project setting. Does this sound like something that could shoot me in the foot down the line? Any suggestions for getting rid of it?
i386
is 32 bit x86. You need to make sure that all the libraries you build are x86-64
. Note that checking the project settings may not be sufficient, as the architecture can be overridden at the target level, so you need to check the architecture for each target too.
精彩评论