Author Topic: Adding more flags to GCC  (Read 20262 times)

Offline Bruno

  • Single posting newcomer
  • *
  • Posts: 4
Adding more flags to GCC
« on: November 26, 2009, 09:39:54 pm »
Hello All!
Maybe it is a silly doubt, but how can i add others flags not listed in <All Categories> of Compiler flags.
I am using Linux 8.02 Code::Block, and I want to use a specif compilation line, just like:

gcc -lstdc++ -lreadline -lncurses main.cpp

Is there anyway that I can do that? I mean, put the flags -lstdc++ -lreadline -lncurses?

Thanks in advance!

Bruno!

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Adding more flags to GCC
« Reply #1 on: November 27, 2009, 07:41:27 am »
Your example flags are link-libraries, so you can add them to the projects "Build options -> Linker settings -> Link libraries:", just add "stdc++", "readline" and "ncurses" (without the quotes) to the libraries list.

Other compiler flags can be set in "Build options -> Compiler settings -> Other options" ( for additional linker flags there is a similar tab in the "LInker settings" too).

Offline Bruno

  • Single posting newcomer
  • *
  • Posts: 4
Re: Adding more flags to GCC
« Reply #2 on: November 27, 2009, 02:13:38 pm »
Thanks a Lot!
It is working perfectly nice!

Cheers!