Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to compile c++ in Linux(RedHat).
Help me!
Posted
Comments
Sergey Alexandrovich Kryukov 13-Jun-11 5:11am    
Just use GCC. What's the problem?
--SA
Lois Reonardo 13-Jun-11 6:59am    
Thank you.
I success.

Use the g++ compiler, e.g. type at command prompt:

C++
g++ -o myapp myapp.cpp


where 'myapp' is the name of the (compiler generated) executable, 'myapp.cpp' is your C++ source file.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Jun-11 5:17am    
Correct, a 5.
Please see my answer, a bit different.
--SA
Use GCC. You will find all the options here: http://gcc.gnu.org/[^].

Want some something like Visual Studio? Use Anjuta IDE, see http://en.wikipedia.org/wiki/Anjuta[^], http://www.anjuta.org/[^].

If you have a program distribution in source code, you typically unpack it in a directory and command:
./configure
make
make install


Last command you do as root, for example: sudo make install.

—SA
 
Share this answer
 
v2
Comments
CPallini 13-Jun-11 5:30am    
Complete! 5.
Sergey Alexandrovich Kryukov 13-Jun-11 12:03pm    
Thank you. Did you mean to actually vote? :-)
--SA
CPallini 13-Jun-11 14:23pm    
As usual, I forgot to, sorry :-O. Fixed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900