Re: strange linking problem



Thanks Richard, I didn't know that. I usually use C, and since strings
don't exist there I sort of assumed that to be similar in f90.

I hope I don't sound like a complete moron now, but I still don't quite
understand this. As far as I know, the linker goes through the object
files and looks for unsatisfied references to functions and variables.
Then it looks through the libraries and tries to satisfy those
references by linking code from the libraries into the executable. If
that's correct, then I don't understand how the linker does not either
1) find a reference to "test", link that in from the library and
everyone's happy, or 2) see that "test" is not satisfied and give me an
error. The fact that it does not complain suggests that the linker
indeed is linking something into the executable from the library. But
apparently something that does not contain the literal string that I
assigned to "test".

Could someone explain this to me?

Thanks, nick

.



Relevant Pages

  • Re: strange linking problem
    ... I usually use C, and since strings ... > files and looks for unsatisfied references to functions and variables. ... then I don't understand how the linker does not either ... that there should be a data area of a certain size and a certain name. ...
    (comp.lang.fortran)
  • Re: calling my custom function same as library function
    ... > malloc() is placed between their other object files and the ... > right such as the other libraries. ... > unsatisfied references to the left of the current object. ... I think you are confused about the linker action. ...
    (comp.lang.c)
  • RE: unresolved symbols __eqd, __negd, __itod etc while building platform
    ... The __imp_ prefixes are references to the import table that the linker ... exported by various libraries like corecrt.lib, ...
    (microsoft.public.windowsce.embedded)
  • Re: creating a Fortran library
    ... It is just how the Unix linker works... ... The main program has references ... which reference other libraries (quite common in all but pretty small ... You then need to specify the libraries in an appropriate ...
    (comp.lang.fortran)
  • Re: gcc linkage problems
    ... > references to symbols that are defined in the library. ... With your command line, the linker first opens ... I have extracted objects from ... > ordering for libraries objects with and without the static specifier. ...
    (comp.lang.cpp)