|
|
#1 |
|
Prospect
Join Date: Nov 2009
Posts: 2
|
Help using a static library with XCode
Hi.
I hope I am posting this in the right place... So here it goes. I am trying to make an iPhone/PC C++ application work on a iMac with MAC OS X 10.5. The application uses SOIL to load .png images on the PC. I would like to use SOIL on the Mac too since it is supposedly a multiplatform library. I have linked the following to xCode project : libSOIL.a, Cocoa.framework, GLUT.framework and OpenGL.framework. I have added #include <SOIL.h> to my stdafx.h file which is included in all my classes and the header search path $(SRCROOT)/soil/src where is located the only SOIL.h file on my machine. Now, everything compiles fine except that when the application is in the linking phase I get the following error : "_SOIL_load_OGL_texture" referenced from : "_SOIL_free_image_data", referenced from : "_SOIL_load_image", referenced from : I had similar problems using iconv but when I added libiconv.2.dylib to my xCode project, it corrected them. So I thought adding libSOIL.a would do the trick but apparently it is not where the problem is. Anyone has any idea about how to link a static library (.a file) in xCode or a link to a tutorial. Maybe just tell me what is difference between linking .a versus linking a dylib since the latter works... Google was not much help so far. |
|
|
|
|
|
#2 |
|
Prospect
Join Date: Nov 2009
Posts: 2
|
All right.. xcode kind of "owned" me there. Instead of linking the libSOIL.a file, all I had to do was actually to add everything .h and .c in soil/src in my xCode project to make it work. I am still wondering what's the use of making a .a file it is not working anyway ??
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|