Sorry, didn't understand that it was supposed to be a l instead of an i. Anyways the error disappeared now, but it says that it doesn't exists instead (linker error).
That's really strange because it didn't say that when the paramter was "i", which is the one that should return that message. Now when the right parameter is in place it returns the doesn't exist error, really odd.
SDL IMG_Load
Quote:Original post by password
Sorry, didn't understand that it was supposed to be a l instead of an i. Anyways the error disappeared now, but it says that it doesn't exists instead (linker error).
That's really strange because it didn't say that when the paramter was "i", which is the one that should return that message. Now when the right parameter is in place it returns the doesn't exist error, really odd.
you forgot this step:
Quote:From the tutorial
Next extract the lib file that's inside of lib subfolder of the archive to the Dev C++ lib folder.
The Dev C++ lib folder should be at C:\Dev-Cpp\lib.
and it's not strange. The first time it was complaining that you never told it where the function was (which is what a lib file does), and now it's complaining it can't find the lib file you're trying to link against.
Does mingw load <whatever>.lib files with the -l parameter? I thought it only loaded lib<whatever>.a files, maybe Im wrong.
For SDL_Image, I've always used the file libSDL_image.a (not SDL_image.lib, i may have downloaded a devpack or compiled it myself, i can't remember, i installed it long ago...) and have never had problems. For .lib's I've always added the full path (eg: whatever/dev-cpp/lib/foo.lib instead of -lfoo or if the file was libfoo.a i use -lfoo).
For SDL_Image, I've always used the file libSDL_image.a (not SDL_image.lib, i may have downloaded a devpack or compiled it myself, i can't remember, i installed it long ago...) and have never had problems. For .lib's I've always added the full path (eg: whatever/dev-cpp/lib/foo.lib instead of -lfoo or if the file was libfoo.a i use -lfoo).
Quote:Original post by Lazy Foo
that means SDL_image.lib is not in C:\DEV-C_~1\lib or you put -l-lSDL_image
double check.
Maybe he DOES have THAT, but that won't matter. He probably doesn't have libSDL_Image.a.
[grin][wink]
In my /DevCpp/lib dir, I have the files "SDL_ttf.lib" AND "libSDL_image.a" and both of them work the exact same way in the parameters tab - that is, I use -lSDL_ttf -lSDL_image. Works fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement