User forums > General (but related to Code::Blocks)
simple problem with path maybe?
noidian:
Hi,
I have installed the codeblocks 10.05. on ubuntu lucid.
The problem is the hello world startup throws error:
Compiling: main.cpp
execvp(g++ -Wall -fexceptions -O2 -c /media/Data/pcie_driver/main.cpp -o /media/Data/pcie_driver/obj/Release/main.o) failed with error 2!
Process terminated with status 255 (0 minutes, 0 seconds)
0 errors, 0 warnings
I have tried changing the Project->properties and modifying the settings etc.
The command works fine by itself in bash shell.
Any help would be great.
Jenna:
Do you have the g++-package installe ?
If yes, what happens, if you use the same command in a console ?
MortenMacFly:
--- Quote from: jens on July 31, 2012, 08:57:16 pm ---If yes, what happens, if you use the same command in a console ?
--- End quote ---
--- Quote from: noidian on July 31, 2012, 05:55:22 pm ---The command works fine by itself in bash shell.
--- End quote ---
Did you select a different shell in C::B - other than the bash you used fore testing?
Did you use a different parametrisation of the same shell in C::B and for testing?
Jenna:
--- Quote from: MortenMacFly on July 31, 2012, 09:20:46 pm ---
--- Quote from: jens on July 31, 2012, 08:57:16 pm ---If yes, what happens, if you use the same command in a console ?
--- End quote ---
--- Quote from: noidian on July 31, 2012, 05:55:22 pm ---The command works fine by itself in bash shell.
--- End quote ---
Did you select a different shell in C::B - other than the bash you used fore testing?
Did you use a different parametrisation of the same shell in C::B and for testing?
--- End quote ---
??? Totally overread that, sorry.
What is the compilers masterpath of the toolchain ?
You can try to put the env command in the projects prebuild steps to see, whether the PATH-variable is correct, so g++ can be run.
The return value of 2 of execvp means ENOENT as far as I know.
ENOENT = no such file or directory
noidian:
Hi,
Thanks for the responses.
--- Quote ---Did you select a different shell in C::B - other than the bash you used fore testing?
--- End quote ---
I assume the C::B uses the bash shell by default. So I am not sure how to go about changing that.
--- Quote ---Did you use a different parametrisation of the same shell in C::B and for testing?
--- End quote ---
I guess no, since I have no exact idea of how to change out of the bash shell in C::B.
--- Quote ---What is the compilers masterpath of the toolchain ?
--- End quote ---
I went to -> Settings->Compiler and..-> Toolchan exec
in that for g++ is /usr/bin
which I presume is the compiler masterpath, your asking for.
--- Quote ---You can try to put the env command in the projects prebuild steps to see, whether the PATH-variable is correct, so g++ can be run.
--- End quote ---
I tried adding /usr/bin to the bash as PATH=$PATH:/usr/bin/g++ , export PATH
Adding that path to the prebuild in Project- > build options, still throws an error 2.
(Is this what you meant?)
Navigation
[0] Message Index
[#] Next page
Go to full version