SDL_image.h help

closed account (Dy7SLyTq)
So im wanting to make a program in sdl and im learning on lay foos site. evreything was working fine until lesson 3-4 (im using windows/code::blocks/mingw btw) where it has me try to install the SDL_image header. i did that fine, and put the *.dll's in the folder with the exe and the SDL_image.lib in the lib folder. i know that its just the SDL_image that isnt working because SDL was before it. anyways when i go to compile it says it cant find the function IMG_Load(char *) even though i verified the function is in the header. i know the code is right because i copied the whole thing from the source online
Last edited on
Do you get a linker error or a compilation error?
closed account (Dy7SLyTq)
compilation

edit:
its a linker
Last edited on
Are you including SDL_image.h? What is the exact error message you get?
closed account (Dy7SLyTq)
http://i1279.photobucket.com/albums/y526/DTSCode/error_zpsd81a0954.png
Ok, it's a linker error. Did you forgot to link to SDL_image?
http://lazyfoo.net/SDL_tutorials/lesson03/windows/codeblocks/index.php#5
closed account (Dy7SLyTq)
sorry. i havent used an ide linker before this (i would compile command line style) so i was used to seeing the ide give just compilation errors. heres the snapshots. (i think im linking correctly but probably not).
http://i1279.photobucket.com/albums/y526/DTSCode/dir_zps6acf9e24.png
http://i1279.photobucket.com/albums/y526/DTSCode/lib_zpse2461323.png
http://i1279.photobucket.com/albums/y526/DTSCode/linker_zps7e4c2010.png
Try if recreating the project helps.

I'm more or less guessing but my thought was that maybe each project has it's own compiler settings which is set to the global compiler settings when the project is created and updating the global compiler settings will not modify the compiler settings of any existing project.
closed account (Dy7SLyTq)
i rebuilt it but it didnt help
I didn't mean just rebuild. I mean creating a new project from scratch.
closed account (Dy7SLyTq)
sorry... i forgot that rebuild is an ide term. thats what i meant. i deleted it and remade the project. (sorry for the seemingly lack of knowledge i just started using an ide again)
closed account (Dy7SLyTq)
i appreciate the help, but i figured it out. in my tired state last night i copied the 32 bit files instead of the 64 bit files. it works fine now. thanks anywways though
closed account (N36fSL3A)
Dang, you answered before I got on to help. :(

Anyway it's great that you fixed it. I wish you luck with SDL.
closed account (Dy7SLyTq)
ty sorry for bothering you fred. probably shouldnt code at one in the morning
Topic archived. No new replies allowed.