Linking error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • myth.drannon@gmail.com

    #1

    Linking error

    [Error E2007] symbol 'FunctionFromA' referenced in file 'File_B.DOJ'
    could not be resolved

    I include the header with the missing function. What's more strange
    that another file containing exactly the same function calls and
    include files and being in the same directory compiled well.

    Any ideas guys ?

  • Keith Thompson

    #2
    Re: Linking error

    "myth.drannon@g mail.com" <myth.drannon@g mail.com> writes:[color=blue]
    > [Error E2007] symbol 'FunctionFromA' referenced in file 'File_B.DOJ'
    > could not be resolved
    >
    > I include the header with the missing function. What's more strange
    > that another file containing exactly the same function calls and
    > include files and being in the same directory compiled well.
    >
    > Any ideas guys ?[/color]

    Including a header gets you (among other things) the *declaration* of
    a function, so the compiler can generate calls to it. It doesn't
    include the code for the function in your final program.

    The code is probably in some kind of library file. You need to tell
    your linker to look at library. The method for doing this is
    different for different systems.

    If that's not enough to answer your question, look at your system's
    documentation; failing that, try a newsgroup that's specific to your
    system.

    --
    Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.

    Comment

    • Ian Collins

      #3
      Re: Linking error

      myth.drannon@gm ail.com wrote:[color=blue]
      > [Error E2007] symbol 'FunctionFromA' referenced in file 'File_B.DOJ'
      > could not be resolved
      >
      > I include the header with the missing function.[/color]

      Did you include the object file with the missing function in your link?


      --
      Ian Collins.

      Comment

      Working...