   error LNK2001: unresolved external symbol _WinMain@16
  ive been working on my project for a while and its been working fine... i havent runned it in release mode for a few days... and today when i tried to compile it in release mode i get the following error.. error LNK2001: unresolved external symbol _WinMain@16why?! it is a windows applicationand it works fine in debug mode[Edited by - Dragon_Strike on March 30, 2008 8:23:27 AM]
  Hello Dragon_Strike,I guess you are seeing this error because the project has become a little confused about the about whether you are building a console application or a windows application (_WinMain@16 is the entry point for a console application).I would try the suggestions on the following link: http://www.cryer.co.uk/brian/mswinswdev/msdev_lnk2001ueswm.htm which shows how to check/ change the entry point in MSVC.Cheers,Tom   ;  Assuming VC205 (Other versions will be similar): Go to project settings (Alt+F7) -> Configuration Properties -> Linker -> System, and change "Subsystem" to "Windows (/SUBSYSTEM:WINDOWS)".I suspect that following the above link will have its own problems, since your app will still be being built as a console app.   ;  thx but that didnt help...i put the entry point in Linker/Advanced to wWinMainCRTStartup ... no differance   ;Quote:Original post by Evil SteveAssuming VC205 (Other versions will be similar): Go to project settings (Alt+F7) -> Configuration Properties -> Linker -> System, and change "Subsystem" to "Windows (/SUBSYSTEM:WINDOWS)".I suspect that following the above link will have its own problems, since your app will still be being built as a console app.it already had that setting... havent changed anything there... id like to point out that it did work in release mode a few days ago..EDIT:could it have something to do with precompiled headers? its the only setting ive been changing the last few days   ;  What does your WinMain() declaration look like?   ;  Demo1.cpp#include "Demo1.hpp"#include "Application/Win32Exception.hpp"int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow){try{  return Demo1().Run();}catch(const drone::application::win32::Exception& e){}catch(const std::exception& e){}catch(...){::MessageBox(0, TEXT("Unknown Exception"), 0, 0);}return 0;} // APIENTRYEDIT:: im using VS 2008   ;  What if you rename _tWinMain to WinMain? That's what the linker is expecting after all...   ;  error C2731: 'WinMain' : function cannot be overloaded   ;  It seems like you somehow have inconsistent UNICODE defines in your project; the linker is expecting a non-Unicode version of WinMain() and you're giving it a Unicode version. If you change the tWinMain() function to WinMain() make sure that the third parameter is a LPSTR, not a LPTSTR.   