User forums > General (but related to Code::Blocks)
Day 0 Newbie:- Trying to get anything to work ! Help !
timmoore46:
Errr.... do I understand the correctly that I HAVE to use C++ and I can't use GCC ?
A very very puzzled,
Tim
eoneuk:
change test.cpp to test.c
Jenna:
--- Quote from: timmoore46 on September 05, 2013, 12:05:23 am ---Errr.... do I understand the correctly that I HAVE to use C++ and I can't use GCC ?
A very very puzzled,
Tim
--- End quote ---
--- Quote from: eoneuk on September 05, 2013, 01:11:36 am ---change test.cpp to test.c
--- End quote ---
You should learn to read more exactly:
--- Quote from: jens on September 04, 2013, 08:14:51 pm ---This should lead you in the right direction:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
especially the last line.
--- End quote ---
This is the last line:
--- Quote from: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F ---Remember the file extension matters: *.c is compiled as C file, *.cpp is compiled as C++ file. Read more
--- End quote ---
timmoore46:
Quote/Q: How can I change the language of the compiler (gcc) output to english?
A: Codeblocks 12.11 or higher: Settings->Environment->Environment Variables. Add "LC_ALL" with value "C". ->Set Now -> Ok
Since a few releases gcc is localized. This can make difficult to find (google ;) ) solutions for specific problems. With this setting the output is again in english.
!! this can break displaying of non-aschii characters so you can also use LC_ALL = en_US.utf8 (http://forums.codeblocks.org/index.php/topic,17579.msg120613.html#msg120613)
/end of Quote
I'm using 10.05 because that is what Linux Ubuntu 12.04 was prepared to download and install. Candidly I don't think this early version supports GCC.
Error message was:-
Compiling: /home/tim/0My Everything/My C/hello.c
Linking console executable: /home/tim/0My Everything/My C/hello
/bin/sh: 1: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings
____________
Now I can run this program 'hello.c' from Bash no probs.
Unfortunately I've not understood 95% of the replys, but I did understand changing the extension to ".c"
I think I'll return to Bash as something is 'not fully cooked', maybe its me, maybe its 10.05 of C::B, I'm just puzzled such a simple thing as running 'hello world' is seemingly impossible from this IDE on my version of Linux.
: (
Tim
Jenna:
If you want to use c++ (g++ is the executable of gcc's c++-compiler), you have to install the appropriate package explicitely with your favourite package-manager.
On Debian based systems (like Ubuntu) it should be enough to run sudo apt-get install g++ .
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version