I add an console project to my main project, and I got the error message as title in linking phase.
error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartupHelper
Solve:
Right click on project -> Properties -> Linker -> Entry Point -> type 'wmain'
It is because my project entry point is _tmain and it will link to _tWinMain for CE OS.
So, we have to specify our entry point.
Reference:
Source code in tchar.h
#define _tmain wmain #ifdef UNDER_CE # define _tWinMain WinMain // On CE it's always WinMain #else # define _tWinMain wWinMain #endif |
沒有留言:
張貼留言