?
Solved

compilation of programs

Posted on 2002-04-24
1
Medium Priority
?
251 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 150 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

AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.

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 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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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