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 852853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:40:03+00:00 2026-05-15T07:40:03+00:00

I am really new to GCC and I don’t know how to use it.

  • 0

I am really new to GCC and I don’t know how to use it. I already have a copy of a pre-compiled gcc binaries I’ve downloaded from one of the mirror sites in the gcc website. Now, I don’t know where to go from here. Please give me some tips on how I can proceed.

I am sorry for the rather vague question..

What I want are tips on how to use GCC. I’ve programmed in C in the past using the TC compiler. Thanks!

I really appreciate all of your suggestions. Thanks again.. 🙂

  • 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-15T07:40:03+00:00Added an answer on May 15, 2026 at 7:40 am

    Baby steps to start with.

    Create the file you want to compile (hi.c) in your favorite editor, like:

    #include <stdio.h>
    int main (void) {
        printf ("Hi there\n");
        return 0;
    }
    

    Then from the command prompt, execute:

    gcc -o hi hi.c
    

    That will give you an executable you can then run.

    Beyond that, it really depends on how much C (or C++ or other GCC language) you know. If you’re a beginner at C, rather than just the GCC toolchain, get yourself a good beginner’s book on the language and start reading. Most importantly, do the exercises, play with the code and so forth.


    Based on your update that you’re comfortable with C itself (the Borland line), you’ll probably only be interested in the immediate GCC differences.

    GCC is a command-line compiler. There are IDEs that use it but GCC itself is not an IDE. That means you’ll probably be doing command-line compilation.

    The basic forms of this are:

    # creates an executable "exe" from your source file "src.c"
    gcc -o exe src.c
    # creates an executable "exe" from your source files "src.c" and "extra.c"
    gcc -o exe src.c extra.c
    # creates object files from your source files
    gcc -c -o src.o src.c
    gcc -c -o extra.o extra.c
    # creates an executable file "exe" from your object files
    gcc -o exe src.o extra.o
    

    Once you get sick of doing that, you’ll want to learn how to use make, a way of automating the build process with a file containing rules (dependencies and actions to take), such as:

    all: exe
    
    clean:
        rm -rf exe src.o extra.o
    
    rebuild: clean all
    
    exe: src.o extra.o
        gcc -o exe src.o extra.o
    
    src.o: src.c
        gcc -o src.o src.c
    
    extra.o: extra.c
        gcc -o extra.o extra.c
    

    I don’t do justice to the power of make here, it’s far more expressive than it looks.

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

Sidebar

Related Questions

I'm really new to android and I got an issue that I don't clearly
I am really new to the programming but I am studying it. I have
I am really new with PHP and all I have to do is to
I am really new to Ruby and could use some help with a program.
I really new to Python and coding in general, but I have been making
i have the following code compiled with GCC 4.2 / XCode. template <typename T>
Really new and learning C# and following along some training video from PluralSight. Great
im really new to flash, how do i go about creating a variable which
im really new to linq-to-SQL so this may sound like a really dumb question,
I am really new to java (started learning 2 days ago). Sorry if this

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.