Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: userx-bw on October 06, 2017, 11:05:34 pm

Title: need a little help setting up the compiler c++
Post by: userx-bw on October 06, 2017, 11:05:34 pm
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`
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
Title: Re: need a little help setting up the compiler c++
Post by: oBFusCATed on October 07, 2017, 12:32:50 am
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