LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   how to compile c++ programs in 10.1 official (https://www.linuxquestions.org/questions/mandriva-30/how-to-compile-c-programs-in-10-1-official-263555/)

msalimane 12-07-2004 04:49 AM

how to compile c++ programs in 10.1 official
 
Hi sorry but i would like to ask how can i use a program like MS Visyual C++ to compile my C++ programs . i'm really a newbie so i dun know. i'm having 10.1 official powerpack with kdevelop and allthat but when i open i dun know how too use it

rjlee 12-07-2004 10:18 AM

KDevelop is the nearest thing Linux has to Visual Studio. You'll find other IDEs if you search for them on freshmeat.net but don't expect anything more MS-like than what you already have.

The easiest way to compile a C++ program (in my oppinion) is on the command-line. The command is
Code:

c++ options *.cpp -o outfile
Here, options is either -O3 to optimise your code or -g to add debugging information. *.cpp selects all the files ending in .cpp (all C++ files in the current directory) and outfile is the filename of the binary to be produced.

To compile a project in KDevelop, you just need to import the source files (I think you can just drag them onto the project window), and then choose the compile option.

Some projects use automake, configure and so on to set up things that need different compiler flags depending on the project; if you create a project in KDevelop then it will set all of this up for you and you just have to click on compile and say yes a few times.

opjose 12-07-2004 12:30 PM

Better still follow the directions on my sig.

Then from the menu go to "Install Software"

and under Mandrake choices look in Developement for a slew of IDE, compilers and tools, all free of course.


All times are GMT -5. The time now is 10:26 PM.