PRB: LNK4022 & LNK4006 Warnings When Build PowerStation 32 DLLLast reviewed: December 9, 1995Article ID: Q123668 |
The information in this article applies to:
SYMPTOMSThe following errors are generated when building a DLL using a module definition (.DEF) file that does not use the fully decorated name of a function named testing:
warning LNK4022: cannot find unique match for symbol "TESTING" warning LNK4006: _TESTING already defined in test.obj; second definition ignored warning LNK4006: _TESTING@4 already defined in test.obj; second definition ignored LINK : error LNK1141: failure during build of exports file RESOLUTIONUse the fully decorated name in the EXPORTS section of the DEF file or the LINK command line.
MORE INFORMATIONThere may be times when it is desirable not to modify the Fortran source code to add the DLLEXPORT attribute to a function. For example, you might want to maintain a common code base for several computer platforms. In this case, the exports must be identified in the EXPORTS section of a .DEF file or the LINK command line. In either case, if the name specified is not the fully decorated name, the errors described above will be generated by the linker.
Steps to Reproduce Problem
Example ResolutionTo successfully link and produce a DLL, include the fully decorated name in the .DEF file:
library test EXPORTS _TESTING@4or in the EXPORT LINK option:
link test.obj /dll /export:_TESTING@4 msfrt.lib msvcrt.lib Sample CodeC Compile options needed: none
subroutine testing(i) integer i i = i*2 end |
Additional reference words: 1.00 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |