For some reason, I can't get Code Blocks to set the linker libraries correctly. I'm trying to build an Irrlicht project (and before anyone mentions it, the Irrlicht Project template doesn't work on Linux) which compiles and runs successfully using this command:
g++ -I/opt/irrlicht/include -I/usr/X11R6/include -O3 -ffast-math main.cpp -o helloworld -L/usr/X11R6/lib -L/opt/irrlicht/lib/Linux -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
Now I'm trying to put all these flags in the Projects -> Build Options -> Compiler Settings -> Other Options, like this:
-I/opt/irrlicht/include
-I/usr/X11R6/include
-O3 -ffast-math
-L/usr/X11R6/lib
-L/opt/irrlicht/lib/Linux
-lIrrlicht
-lGL
-lGLU
-lXxf86vm
-lXext
-lX11
Note: I'm entering those in the 'Release' build target. However, Code::Blocks will not recognize any of these settings, and this is the command it outputs:
g++ -L/usr/bin/lib -L/usr/lib -o bin/Release/testgbread obj/Release/main.o
Obviously this fails to compile. Why is it not reading my options? I've tried every Policy - target only, project only, append, prepend - they all do the same thing, not recognizing the settings. Is this a bug or am I missing something about how it works?