I get the following error when I try to run my program using "sudo ./configure"
configure: error: C++ compiler cannot create executables
The log file (renames to config.txt) is attached.
Any help would be greatly appreciated!![]()
This is a discussion on ./configure doesn't work in within the C++ Programming forums, part of the General Programming Boards category; I get the following error when I try to run my program using "sudo ./configure" configure: error: C++ compiler cannot ...
I get the following error when I try to run my program using "sudo ./configure"
configure: error: C++ compiler cannot create executables
The log file (renames to config.txt) is attached.
Any help would be greatly appreciated!![]()
Is everything all right with your GCC installation?./configure: line 1759: g++: command not found
If you want people to help you, try to provide Short, Self Contained, Correct (Compilable), Example
[ C++ FAQ Lite | Stroustrup's FAQ | C++ interview questions | Boost | Nuwen's MinGW | Valgrind | JTC1/SC22/WG21 | GDB tutorial ]
How do I check that?
Looks like you have ubuntu. Have you tried "sudo apt-get install build-essential" ?
Either type "which g++" or "g++ -v" at the command line.
If either give a message to the effect of "command not found", it means either that gcc is not installed, or - if it is installed - your settings (path, etc) are incorrect so you can't execute it. Since you're getting the message when using sudo to execute the configure script, you need to check those settings are correct for the superuser (root).
If "g++ -v" gives a few lines describing versions of g++ and (maybe) libraries, then the setup is probably working.
Right 98% of the time, and don't care about the other 3%.