My user story: I want to load a texture into my openGL program.
My question: How do I link the SOIL library properly in xcode 4.0.2
So, I've been googling over the past few days regarding my linker warnings in xcode4, and am unable to answer it for myself - so I'm daring to post another thread on the subject... (humble beginner tucks tail between legs).
My bare-bone repro steps:
- I unzip the 'Simple OpenGL Image Library' to my downloads
I drag/drop libSOIL.a to my project file
- Under 'Build Phases', libSOIL.a is automatically added to 'Link Binary With Libraries'
- Under 'Build Settings', my Library Search Paths is also automatically updated
- my Valid Architectures already specify "i386 x86_64"
I get this warning when I try to run my program:
ld: warning: ignoring file /Users/Scott/Developer/Projects/SpaceRanger/Code/Production/lib/libSOIL.a, file was built for archive which is not the architecture being linked (x86_64)
As I mentioned, I'm quite new to programming and IDE's in general, so I was hoping that a simpler approach to loading textures in OpenGL (e.g. SOIL) would be favorable to SDL or even GLFW for that matter. If I'm having this sort of trouble loading only a library, those must absolutely be out of my league.
Other Hit n' Miss attempts based on searching:
- adding the library to 'Compile Sources' only generating more warnings
- toggling 'Build Active Architecture Only' Yes/No
- setting schemes to 32 and 64 bit
- writing my own texture loader, employing libjpg/DevIL/etc.
I'm afraid I'm beginning to mangle my project just trying to link this library. If someone could help me to link the SOIL library properly in xcode 4.0.2, I would be eternally grateful.
Thank you deeply in advance.
-kropcke