Author Topic: need a little help setting up the compiler c++  (Read 160 times)

Offline userx-bw

  • Multiple posting newcomer
  • *
  • Posts: 11
need a little help setting up the compiler c++
« 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: [Select]
-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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10277
Re: need a little help setting up the compiler c++
« Reply #1 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
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]