gcc compiler
Hello,
I installed the compiler using yum. yum install gcc Is that all I need? The programmer said he is having issue :(. OS is centos 6.4 The compiler is good for C/C++? I did a 'which cc", its there also. I noticed its a link to gcc. |
What issues he has? gcc itself only contains the C compiler, I think the C++ one is in a seperate package (But maybe I am wrong, I use fedora). If the C++ compiler is installed as well, maybe a library is missing?
Remember that for building things, you usually need the developer version of a package (like "lib*-dev", please don't use THIS as a yum install parameter, it's probably gonna screw up your system!) and the normal version for running it afterwards. To test whether GCC works, you can use the following: Code:
echo 'main(){}' > dummy.c Code:
Requesting program interpreter: /lib/ld-linux.so.2 Good hunting for that error. |
Usually you need some other tools as the GNU linker ld, the make utility, and so on... You can install all the basic development stuff by means of
Code:
yum groupinstall "Development Tools" |
Quote:
None of the required tools / headers are installed. The minimum is : # yum install gcc-c++ This will also install {glibc-devel glibc-headers kernel-headers}, i.e. the packages that will make up a functional gcc. More tools : See #3 : # yum groupinstall "Development tools" Please check the naming with $ yum grouplist .. Used to be "Development Tools". Now it's most often the lower case T : tools - |
Quote:
yum install gcc-c++ yum groupinstall "Development Tools" I am guessing no reboot is needed? I am going to test the compiler out myself. Thanks, ts |
Just a quick update.
I was able to test the Hello world sample (http://www.network-theory.co.uk/docs...ccintro_9.html) with the C language, but not C++ until I installed (yum install gcc-c++). I also went ahead and installed (yum groupinstall "Development Tools"). |
All times are GMT -5. The time now is 01:15 PM. |