1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Undefined Symbols

Discussion in 'C' started by KyraiSt, Sep 17, 2007.

  1. KyraiSt

    KyraiSt New Member

    Joined:
    Sep 17, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Let me just start out by saying that I am not a total newbie to programming but I am a complete newb to C.
    I'm trying to start an assignment for uni today and I'm running into a problem compiling the source code that they have provided for me. I'm getting these error messages when compiling using DMC.

    my_find.obj(my_find)
    Error 42: Symbol Undefined _optind
    my_find.obj(my_find)
    Error 42: Symbol Undefined _optarg
    my_find.obj(my_find)
    Error 42: Symbol Undefined _getopt_long_only

    These errors are arising in trying to use code from the include file getopt.h. I am doing this work on windows XP and have remembered to download and include the getopt.h file in the include files directory of dmc.

    Any assistance in solving this problem would be greatly appreciated.
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    Those look like they're probably link errors. It takes more than the header file. You have to link in the object file (library file) associated with the header. See the docs for your compiler/linker.
     

Share This Page