User forums > Using Code::Blocks

need a little help setting up the compiler c++

(1/1)

userx-bw:
this is what I have set in the setting for compiler, tried both, ++11 , and ++14
under modify flags I added, this

--- Code: ----std=c++11 -lX11 -Wall -Wno-switch-enum -Wno-switch   `imlib2-config --cflags` `imlib2-config --libs`

--- End code ---
and I am getting an "undefined reference to..." every function call for imlib2 functions.

yet when I opened a terminal then add g++ and that line I get a good compile and a.out. so what is wrong with how I have it set?

Linux, codeblocks ver. 16.01

oBFusCATed:
Read this http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Do a full rebuild and inspect the log.

Then move the linker flags to the linker settings.

Probably this could explain the process: http://faculty.ycp.edu/~dhovemey/spring2011/cs320/lecture/lecture27.html

Navigation

[0] Message Index

Go to full version