-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
I'm trying to create my own 32-bit DLL using static version of libmem-5.1.0 (without external libmem.dll), but every time I try to build the project a linking error appears:
dllmain.obj : error LNK2001: unresolved external symbol __imp__LM_FindModule
C:\Projects\CPPProjects\libmem-test\Release\libmem-test.dll : fatal error LNK1120: 1 unresolved externals
Reproduction steps:
- Clone repo: https://github.com/theberrigan/libmem-test
About project:- 32-bit DLL project
- Used libmem-5.1.0-i686-windows-msvc-static-mt.tar.gz
- In Release Configuration "Runtime Library" is set to "Multi-threaded (/MT)"
- Open
libmem-test.slnin Visual Studio. - Select Configuration "Release" and Platform "Win32".
- Build project
libmem-test. - The error described above will appear.
Project builds without errors with the shared version of libmem, but I need the static version.
Also I found this issue, but this is not exactly my case.
What I did:
- I tried to build the lib with default configuration according to build docs (using nmake).
- I tried to build it like this:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DLIBMEM_ARCH=i386 -DLIBMEM_BUILD_STATIC=1 nmake - I tried to create a solution for VS2022 using Cmake GUI and build project with it.
- I tried different Runtime Libraries (/MT, /MTd, /MD, /MDd)
Versions:
- Windows 10 Pro 10.0.19045 build 19045 (22H2)
- Windows SDK 10.0.26100.0 (matches the WINSDK version from libmem 5.1.0 release)
- MSVC 14.44.35207 (matches the MSVC version from libmem 5.1.0 release)
- MS Build Tools 17.14.23.42201
- VS2022 17.14.18
Metadata
Metadata
Assignees
Labels
No labels