Linking problems with VC


When buiding my program with VC++ 6.0 and witn VC 2003.NET, I get the following error:

error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

Does anybody know what’s going wrong?


Using Google and typing your error message, I get a few answers including this one:

[quote]Create a win32 console application, not a regular win32


Thank you for your help. It works.
But after that, there were the next problem:
It can’t find the libCore.dll.
It looks like I have a problem with my PATH.
I was add root’s libs in my project’s settings (in Settings / Options /…/ Directories) ‘c:\root\lib’, but it still not working!

PATH and the libs dir are two different things, and you need both properly set. Set your environment variable PATH to include %ROOTSYS%/bin, and set ROOTSYS to where root is installed (ask google on how to set env vars under windows, or look for similar posts in this forum - there are plenty).

look at my thread below, i had similar problems getting ROOT to work with vc++ 6.0. The major points were:

make sure you have the latest patch
don’t copy libnew.lib into your worksheet as it will cause compile errors