I am compiling my program in Microsoft Visual C++ 10, and it uses the PDCurses library. I have configured it to link against pdcurses.lib but when I try to run the application the system complains that it can't find "pdcurses.dll". It's not supposed to complain about it. I used to compile programs with MinGW (GCC) and it doesn't ask me about any DLL when I try to run the application. What can I do so that MSVC statically links PDCurses?
In MSVC .lib
files can take two forms:
The former can be used to make your application aware of the exported entry points from a DLL, which will then be written to the import directory of your PE file (or into another similar location for delay-loaded imports).
The latter, however, will actually link the code it contains for every referenced function into your final binary. This is what you want, but you may have to build that static library yourself from the source code, if it is not provided by the release of the library that you want to link.
However, there is another possibility: you could simply be passing the wrong directory for the linker to find the .lib
files. In this case you'd be linking against the import library instead of the static library. Make sure you check your build log for the paths used. This, however, only applies if the distribution of the library contains both types of libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With