I am trying to load a texture to a opengl polygon in artoolkit.
My Artoolkit project has already the SDL, libjpeg and libpng dylib but when i do:
#include <libjpeg.h>
the Xcode says that there is no file or directory, and:
read_JPEG_file("texture/image1.jpg", uiv1Texture);
it says implicit declaration of function read_JPEG_file.
How can i solve this?
You most likely have a working directory problem. Mac applications usually store their image files in the application bundle’s Resources folder, but the Mac version of SDL sets the working directory to a different location. When you try to load the image file, the operating system can’t find it.
The solution is to change the working directory to your application bundle’s Resources folder. You can find instructions on how to do so by reading the "Changing the Working Directory" section of the following article:
SDL Tips for Mac OS X
For your include problem, try including the header file with quotation marks instead of angle brackets. Angle brackets are for system headers, and libjpeg.h isn’t a system header.