| | |
CodeBlocks
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Aug 2008
Posts: 80
Reputation:
Solved Threads: 10
I ve just installed ubuntu intrepid ibex (8.10.) on my laptop
i have been using it for a while already but i just wanted to clear the system completely so i installed it, put some updates, some programs, but i also installed CodeBlocks using synaptic manager. Everything finished smoothly.
Now, i started the program, typed small program just to check if everything works.
I saved it as HelloCodeBlocks.cpp
Here is the code:
but it seems it doesent work.
when i try to compile it (build it) it says this in build log:
Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
/bin/sh: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings
it seems to me that it is trying to use g++ as compiler although it said that gcc is the default one (and i have it on my machine - installed it using synaptic manager)
i tried to change default "c++ compiler" from g++ to gcc and the same thing for "linker for dynamic libs" and than it says:
Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
any suggestions? is there anything i had to configure before first run? thanks in advance
i have been using it for a while already but i just wanted to clear the system completely so i installed it, put some updates, some programs, but i also installed CodeBlocks using synaptic manager. Everything finished smoothly.
Now, i started the program, typed small program just to check if everything works.
I saved it as HelloCodeBlocks.cpp
Here is the code:
C++ Syntax (Toggle Plain Text)
// HelloCodeBlocks.cpp -- First program in CodeBlocks #include <stdio.h> int main (void) { printf ("Hello CodeBlocks!\n"); getch (); return 0; }
when i try to compile it (build it) it says this in build log:
Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
/bin/sh: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings
it seems to me that it is trying to use g++ as compiler although it said that gcc is the default one (and i have it on my machine - installed it using synaptic manager)
i tried to change default "c++ compiler" from g++ to gcc and the same thing for "linker for dynamic libs" and than it says:
Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
any suggestions? is there anything i had to configure before first run? thanks in advance
You have gcc (The C compiler) installed, but not g++ (The C++ compiler). cc1plus is the binary you need, but it comes bundled with g++ (not gcc). Look for build-essential, or at a prompt apt-get install build-essential. Possibly you might just do apt-get install g++, but I think build-essential has more tools.
![]() |
Similar Threads
- Starting " C " (C)
- Me likes Code::blocks! (C)
- Compiler Error: Undefined References; Codeblocks (C++)
- Hello from Ubuntu (Geeks' Lounge)
- Problem using QT4 with codeblocks (C++)
- Good Linux software (*nix Software)
- Still wrong with winuser.h... can not do any thing now (C++)
- compilers.... (C++)
- new to C++ again (C++)
- C+ Compiler (C++)
Other Threads in the C++ Forum
- Previous Thread: Animation problems win 32
- Next Thread: CreateThread return value
Views: 1431 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return sort stream string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






