O
Oneironaut
Hello friends,
I have an issue with a linker warning. It is the warning LNK4089. I am
working in MSVC6.0
I investigated and this warning tells that the import of the library
to which it makes reference is redundant, thus the linker ignores that
library in order to make the code smaller. As it is expected, it only
appears for release versions.
Everybody recommends to disable the warning using a linker directive,
but I would not prefer to do so.
I did not include the conflictive library and I get some errors, that
some symbols could not be found. Here it is where it becomes tricky,
because if I do not link with the specified library the linker does
not find symbols, and if I include the library the linker says that
the library is not used at all (if my hypothesis is right).
Now I tracked further and the functions of this library are used in
another module, which is linked with the module in which I get the
warning.
This module where the functions are used is a static library, and I do
not get the linker tab in the "Properties" submenu for the required
module. That is to say, for DLLs I have a "Linker" tab, where I
include the library I want to use, but for static libraries I do not
have this option (always using the MSVC6.0 IDE).
My hypothesis is that the linker, when trying to link all, realises
that the main module does not use these functions, throwing the
warning. But if I exclude the library from this module, the library is
not linked with the static library in which the function calls take
place and the linker throws an error.
Any idea or suggestion of how to handle this case? Thanks in advance!
I have an issue with a linker warning. It is the warning LNK4089. I am
working in MSVC6.0
I investigated and this warning tells that the import of the library
to which it makes reference is redundant, thus the linker ignores that
library in order to make the code smaller. As it is expected, it only
appears for release versions.
Everybody recommends to disable the warning using a linker directive,
but I would not prefer to do so.
I did not include the conflictive library and I get some errors, that
some symbols could not be found. Here it is where it becomes tricky,
because if I do not link with the specified library the linker does
not find symbols, and if I include the library the linker says that
the library is not used at all (if my hypothesis is right).
Now I tracked further and the functions of this library are used in
another module, which is linked with the module in which I get the
warning.
This module where the functions are used is a static library, and I do
not get the linker tab in the "Properties" submenu for the required
module. That is to say, for DLLs I have a "Linker" tab, where I
include the library I want to use, but for static libraries I do not
have this option (always using the MSVC6.0 IDE).
My hypothesis is that the linker, when trying to link all, realises
that the main module does not use these functions, throwing the
warning. But if I exclude the library from this module, the library is
not linked with the static library in which the function calls take
place and the linker throws an error.
Any idea or suggestion of how to handle this case? Thanks in advance!