When creating a DLL that contains procedures that call graphic DLLs I get the error:
LINK : fatal error LNK1149: output filename matches input filename 'I:\GinoLib\GMENUWI8.LIB'
In Properties of the DLL Project I put the references to the graphic DLL:
Linker --> Input --> Additional Dependencies
"I:\GinoLib\GMENUWI8.LIB" "I:\GinoLib\GMWINERR.LIB" "I:\GinoLib\GINLIBI8.LIB"
Linker --> Advanced --> Import Library
""I:\GinoLib\GMENUWI8.LIB" "I:\GinoLib\GMWINERR.LIB" "I:\GinoLib\GINLIBI8.LIB"
Entry Point : no value
and the Command Line is:
/OUT:"I:\Test_DLL\BinDbg\DLL1.dll" /
INCREMENTAL:NO /
NOLOGO /
NODEFAULTLIB:"libc" /
MANIFEST /
MANIFESTFILE:"Debug\DLL1.dll.intermediate.manifest" /
MANIFESTUAC:"level='asInvoker' uiAccess='false'" /
DEBUG /
PDB:"I:\Test_DLL\BinDbg\DLL1.pdb" /
SUBSYSTEM:WINDOWS /
IMPLIB:"I:\GinoLib\GMENUWI8.LIB" "I:\GinoLib\GMWINERR.LIB" "I:\GinoLib\GINLIBI8.LIB" /
DLL "I:\GinoLib\GMENUWI8.LIB" "I:\GinoLib\GMWINERR.LIB" "I:\GinoLib\GINLIBI8.LIB"
compiling i obtain :
LINK : fatal error LNK1149: output filename matches input filename 'I:\GinoLib\GMENUWI8.LIB'
Either by removing the reference to Additional Dependencies or the Import Libraries the error become:
DLL_1.obj : error LNK2019: unresolved external symbol _MENU_F90_mp_GMDISPLAYERRORBOX referenced in function _WIN_MESSAGE
Can anyone help me ?
連結已複製
Remove the Import Library values - you misunderstand what this is for (not surprising, as it is worded confusingly.) This value is to give the name of the .LIB generated when you build the DLL - the default is that it uses the name of the DLL with a .LIB file type.
Thanks Steve, but as I have already reported in my request, by removing Import Library values i get the error of unresolved external symbol referring to the function in one of the libraries in Additional Dependencies.
OK, that's a separate problem. There is a module called MENU_F90 that has a module procedure GMDISPLAYERRORBOX, for which you're not providing the object file from compiling that module. Not being familiar with the libraries you're linking to, I don't know where this would come from, but it appears to be a GinoMenu routine. You may need to ask the GinoMenu people for help with this.
This suggests that your main program links to something your DLL doesn't. Is that routine yours?
Yes, a DLL can call another DLL - this is more often the case than not. You simply provide the import library for the called DLL when linking the calling DLL.
DLL-ness isn't the problem here. It's that you USE a module but don't provide the object code that resulted from compiling that module.
