Re: Strange linker warning?



The warning means that the linker optimized away all references to functions
exported by CEDDK.DLL (via CEDDK.LIB). Note, however, that the linker's
/OPT:REF optimization doesn't affect the normal linker algorithm of symbol
resolution. The optimization kicks in only after all symbols are resolved.

In this case, your link is pulling in something that references CEDDK.
That's why you get the unresolved externals when you remove it. However,
once the /OPT:REF phase runs, it determines that whatever referenced CEDDK
is itself unreferenced. The linker then transitively removes the reference
to CEDDK and you get the LNK4089 warning. You could fix it by specifying
/OPT:NOREF to disable the optimization, but you are probably best off either
ignoring it or rearranging your code. You need to figure out what is being
pulled in that references CEDDK and remove /that/ by separating it into a
different source file. You might find the /VERBOSE:LIB linker option handy
for this purpose.


--
Russ Keldorph
russellk@xxxxxxxxxxxxxxxxxxxx (Remove the 'online.' from my address to reach
me.)

This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm";


"Ole" <ole@xxxxxxxxxx> wrote in message
news:e5BfqS74GHA.3736@xxxxxxxxxxxxxxxxxxxxxxx
"Ulrich Eckhardt" <eckhardt@xxxxxxxxxxxxxx> wrote in message
news:9o8vu3-djo.ln1@xxxxxxxxxxxxxxxxxxxxxxxxx
Did you enter ceddk.dll as linker input? Otherwise, are you really using
functions from there (that would be the typical error, specifying
unnecessary libs)?


No I entered "ceddk.lib" as linker input and I am sure that I use
functions from there - if I remove it I get some "unresolved external
symbol" errors for the functions I'm trying to use (READ_PORT_UCHAR,
READ_PORT_USHORT and READ_PORT_ULONG).

Best regards
Ole



.



Relevant Pages

  • Re: Home brew Z80 CP/M computer
    ... nice pile of assemblers and linkers. ... But it doesn't say what the SLR tools do with it. ... The thing that I absolutely _LOVED_ about the SLR tools was how well they dealt with external references. ... Reading between the lines, it was easy enough to figure out that Steve had defined a stack machine to do the address calculations, and embedded that into the linker. ...
    (comp.os.cpm)
  • Re: Im a stupid blond :( Please help me!!!
    ... > in a program to be left out of the external references table. ... Well for one the linker that comes with Microsoft Visual Studio 6 (not ... It's the loader's job to adjust ... > get the entire object file that contains that function linked in. ...
    (comp.lang.cpp)
  • 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 native C++ dll code from managed C++
    ... In the project's Property Pages dialog box, click Linker, ... __DllMainCRTStartup@12 to the Force Symbol References property. ... LNK1120: 1 unresolved externals ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Simplify this ?
    ... or can provide references out of hand. ... The situation for Windows is, however, as always: ... For simple information about the international standard, ... optimization, e.g. using sprintf instead of iostreams. ...
    (comp.lang.cpp)

Loading