Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does FIND_LIBRARY not find .DLL libraries under WIN32?

DLL Libraries Win32
0
10 Posted

Why does FIND_LIBRARY not find .DLL libraries under WIN32?

0

For those who come from a Unix background to MS Windows: You never link directly to the .dll, you have to link against the import library .lib for the .dll. Linking against dynamic libraries (.dll under Windows) is quite different from linking against ELF shared objects (.so) under platforms like Linux or NetBSD. In Windows, there are two types of library, a static library and an import library (both confusingly use the .lib extension, however). In Windows, when you build an import library (A.lib) you will get a corresponding (A.dll) that you only need at runtime. At compile time you will need the import library. Conclusion: There is no need to find a .dll for linking. You only need to find the .lib import library. Some more details can be found here: [2].

0

For those who come from a Unix background to MS Windows: You never link directly to the .dll, you have to link against the import library .lib for the .dll. Linking against dynamic libraries (.dll under Windows) is quite different from linking against ELF shared objects (.so) under platforms like Linux or NetBSD. In Windows, there are two types of library, a static library and an import library (both confusingly use the .lib extension, however). In Windows, when you build an import library (A.lib) you will get a corresponding (A.dll) that you only need at runtime. At compile time you will need the import library. Conclusion: There is no need to find a .dll for linking. You only need to find the .lib import library. Some more details can be found here: [2].

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123