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