User forums > Help
I can't compile anything! (Edited) (Solved)
(1/1)
Dannyu NDos:
I am running Code::Blocks version Code::Blocks 16.01 on Ubuntu 16.10 "Yakkety". The compiler I use is GCC 6.2.
I can't compile anything since I tried to switch my compiler to Clang 3.9.1.
When I try to re-build a project (named "Hello, World!" here) that already is built before, it fails. The build log is:
--- Code: ----------------- Build: Debug in Hello, World! (compiler: GNU GCC Compiler)---------------
g++-6 -Wall -g -O3 -std=c++1z -c "/home/ndos/바탕화면/Hello, World!/Hello, World!.cpp" -o "obj/Debug/Hello, World!.o"
g++-6 -o "bin/Debug/Hello, World!" "obj/Debug/Hello, World!.o"
/usr/bin/ld: obj/Debug/Hello, World!.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---
When I make a new project (named "Hello, World!" here) and try to build, it also fails. The build log is:
--- Code: ----------------- Build: Release in Hello, World! (compiler: GNU GCC Compiler)---------------
g++-6 -Wall -O2 -O3 -std=c++1z -c "/home/ndos/바탕화면/Hello, World!/Hello, World!.cpp" -o "obj/Release/Hello, World!.o"
g++-6 -o "bin/Release/Hello, World!" "obj/Release/Hello, World!.o" -s
g++-6: error: obj/Release/Hello, World!.o: No such file or directory
g++-6: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
--- End code ---
I have already tried reinstalling Code::Blocks, reinstalling GCC, purging Clang, switching the compiler back to GCC, but none of them worked. Please help!
stahta01:
What version of Code::Blocks?
Edit: Please post a build log instead of build messages.
Tim S.
BlueHazzard:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
stahta01:
Try using only ASCII letters with no spaces in your project path and filenames.
Tim S.
Dannyu NDos:
--- Quote from: stahta01 on January 18, 2017, 05:40:27 am ---Try using only ASCII letters with no spaces in your project path and filenames.
Tim S.
--- End quote ---
That solved my problem. Thank you very much!
(Furthermore, I changed the default language from Korean to English.)
Navigation
[0] Message Index
Go to full version