The .h and .c files are not libraries. Add .c files to the compilation phase and just #import .h files where necessary.
To check the connection, I did the following:
- Create a new Cocoa Mac app.
- Add 10 files from the SOIL
src folder: SOIL.c, image_DXT.h, stbi_DDS_aug.h, SOIL.h, image_helper.c, stb_image_aug.c, stbi_DDS_aug_c.h, image_DXT.c, image_helper.h and stb_image_aug.h. - Tell Xcode to copy them to my project.
- Add one line to my delegate method
applicationDidFinishLaunching: SOIL_load_OGL_texture( "img_test.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, 0 ); . - Create a goal to run.
Although there are many warnings about the compiler about data conversion, these steps create an executable file without linker errors.
Phillip mills
source share