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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:39:54+00:00 2026-06-08T07:39:54+00:00

How can I know in which step (Pre-Processor,Compiling, Linking) my program got compilation failure?

  • 0

How can I know in which step (Pre-Processor,Compiling, Linking) my program got compilation failure?

For example, I wrote a program of 3 source files: a.c ,b.c, c.c and all three of them included the header file, h.h, which contains all the prototypes of all the source files, but I also implemented one function, in the header file. I know it’s wrong to do, but I wonder on what stage did the program crash, Is it the linking or the compiling, I got an error message, Is this say that the problem is at the linking stage? (otherwise I’ll just get a red underline on the mistake from the compiler?)

Where can I read about linking and what I shouldn’t do regarding headers and source files and linking errors?

(I work in Linux, with Eclipse)

  • 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-06-08T07:39:55+00:00Added an answer on June 8, 2026 at 7:39 am

    You find the location of the error by separating compiling and linking. An error due to the precompiler is unusual and also found during compiling. This is how compiling works on the command line:

    Compile step:

    gcc -c -o a.o -pedantic -Wall a.c 
    gcc -c -o b.o -pedantic -Wall b.c 
    gcc -c -o c.o -pedantic -Wall c.c 
    

    link step:

    gcc a.o b.o c.o -o prog
    

    Of course you need to specify whatever other flags that are necessary (e.g. -l for linking to a library etc.)

    Then read the errors and warnings (!) carefully and you shall find the problem.

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

Sidebar

Related Questions

From code how can we know which interfaces one class implements? Example: interface IDrink
Does anyone know utility which can measure work intensity. For example - keystrokes\mouse clicks
I like how this works in Zend Framework. I can know which environment I'm
How can I know which stored procedure is running in SQL Server 2005. And
I get a protected memory exception, but how can I know which call caused
I have a Django project. Given a url, how can I know which view
How can I know under which IIS version my web application is running in
How can I know during parsing which rule is currently matched? I'd like to
Can I have any way to know which is the depth of a child
How can I know, by using C++ code, which user runs a specific service?

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.