Thread: compiler error

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    34

    Question compiler error

    Can someone tell me some differences between a compiler error and a link error? Thanks.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    77
    if im correct (and i think i am) a llinker error is where you have problems with your header files and a compiler error is where you just have a generic problem in the source code some where.

    -jobo
    Hooked On Phonics Didn't Work For Me!

  3. #3
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    a compiler error tells you if there is a problem with the code, usually a syntactical error - a missing semi-colon, incorrect arguments, etc. If all goes well and no errors are found then they are compiled into object code (.obj files) which the linker can use.

    If the linker finds a problem then it reports the error, this is usually something like not defining symbols or multiple definitions of functions, or missing headers. It means the linker cannot find the code it is looking for, for whatever reason.

    Hope that helps a bit.
    Couldn't think of anything interesting, cool or funny - sorry.

  4. #4
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    the compiler turns your code, one file at a time, into machine-readable code.

    the linker puts together all your machine-readable files, one for each source file you made in this program, and together with any libraries you have linked to, makes one big fat .exe out of it.
    hello, internet!

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    34
    Thank you... that helps. I'm sure you will see many questions from me when I start trying to learn C++. Mcorn.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 04:35 PM
  2. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  3. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM