ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am having trouble compiling my .cpp files. When I try using g++, I am told the the command is not found. I am running the latest version of Ubuntu and am new to the Linux OS. I know that gcc is installed because when I type that in I get no input, and when I type "gcc helloWorld.cpp -o Hello" (for example, and yes, the file exists in my current directory), it states
"error trying to exec 'cclplus':execvp:no such file or directory"
and I do not know what this means. Other things I have tried replacing g++ with are: gcc-c++, gcc-cpp, and gcc-4.1. Does anyone know what else I can do?
tuxdev,
I installed Linux on my machine about a month ago for my programming class, and g++ worked at the time. I haven't changed anything since then as I recall (besides installing MATLAB).
indienick,
you really want me to type "which g++" ?? what does this do?
ok so I typed in "which g++" and I'm not sure what exactly happened, another command line just appeared. It did not tell me where my compiler resides. Is that what was supposed to happen?
ok and now i tried typing in "type g++" and it said command does not exist or something of the sorts, but I am not exactly sure what the "type" command does...
Hmm...very odd indeed. If which didn't give you an error saying it couldn't find it, but gave you nothing back, it may suggest a possible corrupt or butchered install.
Try going into synaptic (or whichever GUI package manager Ubuntu uses), and search for "g++" or the package which the GCC and G++ compilers are provided with.
Seems you need to spend some time reading some doco - on the ubuntu wiki there is several good articles, amongst them a synaptic howto, and a compiling guide.
I think you'll need build-essentials on a Debian based distro - see the guide above for details.
On SuSE, g++ is supplied by a different package than cpp. ( gcc-c++ ). On others the package name may be named different. You should take the error message at its word and install the package that supplies g++.
thanks guys, I feel like a royal git now. I'll try that as soon as I figure out how to get wireless connection ha ha. My drivers are already recognized, I just don't know how to get onto a secure network with linux...
The programming forum wouldn't be the correct forum for your wireless problem, so you probably could post to the networking/wireless forum. However, add your distro and version to your user profile to make it easier getting the right advice. For example, some systems will have a gui config program that you can use that will end up writing to /etc/sysconfig/network/ifcfg-<device> or some other configuration file. Others will have a script somewhere else where it is configured. SuSE will take the information from ifcfg-wlan0 file, for example and create a wpa_supplicant.conf file on the fly, while other distros will read your /etc/wpa_supplicant.conf file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.