0

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:

-------------- 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))

When I make a new project (named "Hello, World!" here) and try to build, it also fails. The build log is:

-------------- 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))

I have already tried reinstalling Code::Blocks, reinstalling GCC, purging Clang, switching the compiler back to GCC, but none of them worked.

1
  • 2
    You may answer your own question if you have solved it. Commented Jan 18, 2017 at 7:04

1 Answer 1

1

(Posted on behalf of the OP).

This problem occured because the path contained non-ASCII characters; I solved it. Furthermore, I changed the default language from Korean to English.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.