User forums > Help

Cannot compile on Linux

(1/2) > >>

FSM:
Hello, I am new to the forum, but I was using Code::Blocks for some time now. I really love it, and I had no major problems that I couldn't solve before. I was using it on Windows with MinGW, but recently I switched to Ubuntu. I think I was able to compile on Ubuntu before, but now when I try to compile anything I get this errors:
-------------- Build: Debug in test ---------------

Compiling: main.cpp
g++: error: to: No such file or directory
g++: error: LDFLAGS: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

I tried going to Settings->Compiler & Debugger -> Toolchain executables but everything seems file in there:
Compiler Installation Directory: /usr (I used auto-detect)
C compiler:                gcc
C++ compiler:            g++
Linker for dynamic:     g++
Linker for static:         ar
debugger:                  gdb
make:                       make
Please help!
Edit: g++, gcc and gdb are installed and work fine on my machine.

 

oBFusCATed:
Read this: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29

Is there a chance that your project is using a custom makefile instead of the codeblock's build system?
If this is the case, you'll have to check your makefile and fix the errors in it.

FSM:
I do not think so.
"This is a custom makefile" is not checked. Is there any chance that the custom makefile is still used without that checkmark being checked?

oBFusCATed:
Then you read the link and fix your project settings.

FSM:
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?

Navigation

[0] Message Index

[#] Next page

Go to full version