I have a project that builds and links a visual studio, but not with our build system.
From what I can tell, tchar.h contains a macro to convert _tmain to wmain if UNICODE is defined. I checked the preprocessor output, and indeed _tmain was replaced with wmain. The file containing wmain then compiles just fine, but the linker complains that main is undefined.
LNK2019: Unresolved external symbolic main link in __tmainCRTStartup function
Converted wmain to main using another set of macros that I incorrectly turn on (due to the lack of -D parameters, etc.), or there is a special flag for link.exe that indicates the entry point.
Thanks.
Manual point / write: mainCRTStartup fixed it.
Edit: I just checked the main.obj file. wmain is definitely defined.
source share