I have a DLL with its import library. When I try to reference the import library, I get linker 开发者_C百科errors that some functions can't be resolved. I think that there is a mismatch in versions of the DLL and its import library. Is there any way to check that an import library fully match its DLL, without checking tons of functions manually via DumpBin?
The problem is that the header file contains functions that are not defined in the .lib file. Most likely you have a new header file and an out of date .lib file.
Possible solutions:
- Contact the library vendor to obtain a .lib file that matches the header file and DLL that you are using.
- Create the .lib file yourself.
When you link binary only *.lib libraries matter (including import libraries but obviously not including DLLs). The linker may even be unaware that it is import library and not some other static library. It is also possible to create mixed library with some functions statically contributed to the *.lib file and others imported from some DLL.
Your unresolved functions just not present in your *.lib libraries (including your import library). If you do link your import library and know for sure that unresolved functions is exported by your DLL then your import library either mismatch or has been produced to not export that functions (e.g. the functions might be not listed in *.def file of DLL project).
精彩评论