Solved

compilation of programs

Posted on 2002-04-24
1
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 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