Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to compile and run C++ in Fedora Core3 with no success.
C no problem but they are hiding the C++ compiler somewhere.
Does anyone know the command.
My code is fine. Why would you want error messages.
All I want is the command as in C to compile:gcc -o hello hello.c
to run: ./hello
Because if I don't know what you are typing to compile, I don't know why it's not working. If you get a "commando not found", then most likely you have gcc but not g++ installed. The command should be:
g++ -o hello hello.cpp
That could be different in FC. Redhat tends to like custom names, paths and kernel
It's always important to give as much detail as possible... regardless the problem and always give the error messages... that's how we start to debug something
Last edited by Mega Man X; 04-18-2005 at 07:25 PM.
That command works perfectly well with Red Hat 7 which I have
been using. Apparently g++ is in there somewhere but it has to
be accessed through gcc according to the Man page but I can't
work it out.
I went to Fedora's homepage and found that the package name for g++ is called "gcc-c++-4.0.0-0.42.i386.rpm"
I would try "gcc-c++ -o hello hello.cpp" as a blind shot. And man, I loved Redhat 7.x series. 7.3 is absolutely my favorite. Things got pretty rough after that though... starting with custom kernel and drop of mp3/media support :\
You can't compile in Fedora Core cause they don't install it by default, unless you specified it during a custom install. Install the appropiate packages and you'll have your C compiler.
g++ file.cc -o file produced a million lines similar to this:
/usr/lib/gcc/i386-redhat-linux/3.4.2./../../../../include/c++/3.4.2/i386-redhat-linux/bita/codecvt-specializations.h:269:error-inbytes'was
not declared in this scope
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.