User forums > Help
Cannot compile on Linux
oBFusCATed:
You have to find where are they being set.
Settings -> Compiller -> [your compiler]
or Project -> Build options (check also the options set by the target).
Also does a simple console project build and run?
Jenna:
--- Quote from: FSM on March 04, 2012, 09:18:31 pm ---Thanks. I read the link and my programs were compiling with this command:
--- Code: ---g++ -Wall -fexceptions -O2 -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -L/usr/lib/i386-linux-gnu -pthread -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/i386-linux-gnu -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -L/usr/lib/i386-linux-gnu -pthread -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/i386-linux-gnu -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -I/usr/lib/i386-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -L/usr/lib/i386-linux-gnu -pthread -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/i386-linux-gnu -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -pthread -c /home/kkostya/Desktop/KLib/main.cpp -o obj/main.o
--- End code ---
and the words "to" and "LDFLAGS" weren't needed. Now, how do I remove this extra commands from Code::Blocks compiler, so it will not use them when generating my programs?
--- End quote ---
This is surely not the whole build log, but it seems that you have the same stuff in global compiler settings, in per project setting and per target settings.
Looks like you call wx-config here with --c[xx]flags and with --libs.
It seems you lack some basic knowledge about the compile and link process.
Note C::B does building an executable in at least two steps: building the object-files and linking them (and the needed libs) together.
You mix this (linking parameters are not needed for compiling).
Be aware, that this forum/website does not teach basic programming stuff.
It's a C::B only site.
If you know what to do, but don't know how to do it in C::B, it's okay to ask here, but if you don't know how to basically build an executable, and wnats to know how you can do this, it violates our forum rules.
You can create projects with the wizard and check how things are setup there, and see what you did wrong.
In general it's not a good idea to put things in the global settings of a compiler, unless you need the stuff for each and every file and project you want to compile with his compiler.
Navigation
[0] Message Index
[*] Previous page
Go to full version