Solved

compilation of programs

Posted on 2002-04-24
1
213 Views
Last Modified: 2010-04-22
I have just installed mandrake and i want to compile my c or c++ codes.  I want to view my output or produce an executable file like how Visual C++ does or Borland?

When i use gcc [filename] -o [filename.o]

is this correct?  How do i produce [filename.exe]
0
Comment
Question by:ogom
1 Comment
 
LVL 4

Accepted Solution

by:
ct.smith earned 50 total points
ID: 6967094
A few things:

1 - Typically executables don't have an extension, Windows is pretty much the only plartform where it is expected.  So, you want your program output to be "filename", not "filename.exe"

2 - The .o extension is usually only used for the intermediate object files, but this is done with the "-c" flag on gcc.

3 - The -o option sepcifies the neme of the output executable, so you can use "gcc filename.c -o filename" as your command.  Without the -o option, you will get an executable named "a.out".

4 - If you want a full IDE like Visual Studio or Borland Builder, you may want to check out KDevelop which comes Mandrake.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now