Jump to content
  • Advertisement
Sign in to follow this  
c4c0d3m0n

Code::Blocks Linker trouble

This topic is 3791 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to use SDL_image with Code::Blocks, but I'm not having luck... My SDL files are under C:\Dev\SDL-1.2.12-mingw32C:\Dev\SDL_image-1.2.6\ In my Compiler options, I've added the include and lib folders under compiler or linker directories respectively. Under my Project Build Options I've added SDLmain, SDL and SDL_image under Linker libraries. For some strange reason, I have to #include <SDL_image.h> instead of #include <SDL/SDL_image.h>. And even then, it throws this at me: In file included from main.cpp:9: C:/Dev/SDL_image-1.2.6/include/SDL_image.h:28:17: SDL.h: No such file or directory C:/Dev/SDL_image-1.2.6/include/SDL_image.h:29:25: SDL_version.h: No such file or directory C:/Dev/SDL_image-1.2.6/include/SDL_image.h:30:24: begin_code.h: No such file or directory C:/Dev/SDL_image-1.2.6/include/SDL_image.h:114:24: close_code.h: No such file or directory What am I doing wrong?

Share this post


Link to post
Share on other sites
Advertisement
All SDL*.h files are meant to be in the same directory. Usually, <include_path>/SDL/. The SDL files may be using relative file paths for including headers.

Share this post


Link to post
Share on other sites
Quote:
Original post by yaustar
All SDL*.h files are meant to be in the same directory. Usually, <include_path>/SDL/. The SDL files may be using relative file paths for including headers.


That all depends on how your include paths are set up in the IDE. For example, I explicitly include both the folder with my plain old SDL headers in it and the folder with the SDL_Image headers in it. Works fine.

@OP: "SDL\SDL.h" didn't work because there is no directory "SDL" inside of your include paths. There's no dark magic going on here; the compiler looks for the file that you've specified I the include paths that you've specified (in addition to the current directory). If there is no such file, it complains.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!