I have some C ++ classes that I would like to compile into a dll file. When I try to compile the project, I get an unresolved external character error:
- error LNK2019: unresolved _WinMain @ 16 character specified in tmainCRTStartup function
- fatal error LNK1120: 1 unresolved external
This is what I have done so far:
I just created a new win32 project, the selected dll and an empty project. Then I copied all the h and cpp files to the directory and added them to the project.
In addition, I added the file "DllMain.cpp" containing this code:
#include <windows.h> BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; }
source share