Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

compilation of programs

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 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