User forums > Using Code::Blocks
Linker libraries with Irrlicht (Linux)
(1/1)
thcrock:
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?
TDragon:
--- Quote from: thcrock on October 28, 2007, 03:24:07 am ---Is this a bug or am I missing something about how it works?
--- End quote ---
The latter.
--- Quote ----I/opt/irrlicht/include
-I/usr/X11R6/include
--- End quote ---
These, minus the -I, go in the Compiler sub-tab of the Search directories tab.
--- Quote ----O3
--- End quote ---
This can be found in the Compiler Flags sub-tab of the Compiler Settings tab.
--- Quote ----ffast-math
--- End quote ---
This one goes where you have it (the Other options tab).
--- Quote ----L/usr/X11R6/lib
-L/opt/irrlicht/lib/Linux
--- End quote ---
These, minus the -L, go in the Linker sub-tab of the Search directories tab.
--- Quote ----lIrrlicht
-lGL
-lGLU
-lXxf86vm
-lXext
-lX11
--- End quote ---
These, minus the -l, go in the Link libraries section of the Linker settings tab.
Cheers,
John E. / TDM
Navigation
[0] Message Index
Go to full version