Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4596826
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:10:12+00:00 2026-05-21T23:10:12+00:00

I am a complete novice with Linux. I have Mint on a laptop and

  • 0

I am a complete novice with Linux. I have Mint on a laptop and have recently been playing around with it.

I wrote a simple C program and saved the file.
Then in the command line I typed

gcc -c myfile

and out popped a file called a.out. I naively (after years of Windows usage) expected a nice .exe file to appear. I have no idea what to do with this a.out file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:10:13+00:00Added an answer on May 21, 2026 at 11:10 pm

    Name it with -o and skip the -c:

    gcc -Wall -o somefile myfile
    

    You should name your sourcefiles with a .c extension though.

    The typical way of compiling e.g. two source files into an executable:

    #Compile (the -c) a file, this produces an object file (file1.o and file2.o)
    
    gcc -Wall -c file1.c
    gcc -Wall -c file2.c
    
    #Link the object files, and specify the output name as `myapp` instead of the default `a.out`
    
    gcc -o myapp file1.o file2.o
    

    You can make this into a single step:

    gcc -Wall -o myapp file1.c file2.c
    

    Or, for your case with a single source file:

    gcc -Wall -o myapp file.c
    

    The -Wall part means “enable (almost) all warnings” – this is a habit you should pick up from the start, it’ll save you a lot of headaches debugging weird problems later.

    The a.out name is a leftover from older unixes where it was an executable format. Linkers still name files a.out by default, event though they tend to produce ELF and not a.out format executables now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't consider myself a complete SQL novice, but I have been staring at
I am a complete novice at php and postgres. I have been searching all
complete novice at work (who is also ill and feeling particularly thick) I have
I am a complete novice in C++. I am trying to read a file
I am a complete novice at C# (I've never used it before) and recently
First off, I'm a complete novice as a web developer. I have a PHP
I'm a complete novice, looking for instructions on implementing javascript. I am attempting to
I admit - I'm a complete novice when it comes to unit testing. I
What is the average time that it would take a complete novice, whose background
So, to preface, I'm a complete novice at this Excel business. I've found similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.