User forums > Using Code::Blocks

N00b needs help getting C::B to see SDL libraries =P

<< < (2/2)

4matsy:
That's odd...at one point I could've sworn I set the compiler directory too, but when I checked, sure enough it was blank...whoops! :oops:

Thanks so much for the help, guys. It's working perfectly now. :D

takeshimiya:

--- Quote from: tiwag on January 12, 2006, 09:07:42 am ---i prefer not to put these things globally because with time you maybe have several versions of the same library
and some of your older apps compile well only with older versions - see wxWidgets as good example for it.
So if you want keep your apps compiling as they were - it is a good advice to put all of your pathes needed for
linker and compiler and anything else what's needed to build your app into your project-information.
This initially is maybe a little bit more work, but saves you a lot of work in the future.

--- End quote ---
I have to disagree, it's adviced for libraries like wxWidgets, or libraries that changes often.

However, SDL API is extremely stable, the libraries are released with a very slow phase, so usually you'll change it one time in a year.
For a newbie, we shouldn't complicate things.

Another option could have been using Global Variables in the SDL project template.


--- Quote from: tiwag on January 12, 2006, 09:07:42 am ---maybe it is a matter of taste, but i would let it be included as <SDL\sdl.h> and only give the right path that this works (no path necessary if copying the SDL header directory in your global mingw\include directory for example.
this way you see on the first sight, from which library your included headers come (if they have not a so obvious name than sdl.h :) )

--- End quote ---
I have to disagree also here. It's not a matter of taste, because the standard way (of most SDL apps) is "sdl.h". In linux for example, there isn't any <SDL\sdl.h>, so your program willn't compile.

Also, putting slashes in that path is not portable between platforms and compilers.

Navigation

[0] Message Index

[*] Previous page

Go to full version