how to solve linker error

This is a discussion on how to solve linker error within the C Programming forums, part of the General Programming Boards category; hi , when i am trying to execute a c file,it is compiling fine with zero errors but having 4 ...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    6

    how to solve linker error

    hi ,

    when i am trying to execute a c file,it is compiling fine with zero errors but having 4 warnings.

    when i am trying execute the option make the exe file, it results linker error:undefined symbol.

    There are 26 such type of errors.

    In the c file it is accessing about 7 user defined header files.

    Earlier i noted that for all these header files ,corresponding objects were not creating.

    so i loaded each header files compiled them resulted creation of their object files.

    but when executing the c file,still there remains linker errors.

    guide me to resolve this issue.

    Thanks and Regards

    Jaisha

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,765
    Post your compiler command line and actual linker error messages (well some of them at least).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    6
    hi,

    when i am trying the compile option ->Make exe file

    results the following linker errors.

    Totally there are 26 such type error.

    i have gone through some header files.

    The symbol which it results errors(like 'rr_malloc') are functions in header files.


    Linker Error: Undefined symbol '_rr_malloc' in module LMCO.C
    Linker Error: Undefined symbol '_rr_calloc' in module LMCO.C
    Linker Error: Undefined symbol '_NewArray' in module LMCO.C
    Linker Error: Undefined symbol '_DeleteArray' in module LMCO.C
    Linker Error: Undefined symbol '_new_index' in module LMCO.C
    Linker Error: Undefined symbol '_sih_lookup' in module LMCO.C
    Linker Error: Undefined symbol '_show_dot' in module LMCO.C
    Linker Error: Undefined symbol '_calc_prob_of' in module LMCO.C
    Jai

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by jaisha View Post
    hi,

    when i am trying the compile option ->Make exe file

    results the following linker errors.

    Totally there are 26 such type error.

    i have gone through some header files.

    The symbol which it results errors(like 'rr_malloc') are functions in header files.




    Jai
    Hopefully (fingers crossed) you don't have any functions in your header files. You should have a prototype of your functions in your header files, and the functions themselves in a source file somewhere. That source file needs to be in your project.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LDAP Query
    By Travoiz in forum C++ Programming
    Replies: 0
    Last Post: 08-13-2009, 03:58 PM
  2. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 11:17 AM
  3. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 03:39 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21