I’m trying to compile the hello world example in VS2008.
I read through the tutorial (and added the libraries, etc.).
When I try to compile I get the following error:
Error 23 error LNK2001: unresolved external symbol _WinMain@16 MSVCRT.lib
I searched on the forums for something similar and couldn’t find such an issue.
How can I get past this?
Better yet: Where can I download a sample project in C++ (preferebly undre vs2008)?
I was sure it should be a windows app.
btw - I have 22 warnings.
some of this nature:
Warning 8 warning C4996: ‘gmtime’: This function or variable may be unsafe. Consider using gmtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\panda3d-1.6.2\include\time_clock.h 195
and the rest of this nature:
Warning 22 warning C4275: non dll-interface class ‘std::_Container_base_aux’ used as base for dll-interface class ‘std::_Container_base_aux_alloc_real<_Alloc>’ C:\Program Files\Microsoft Visual Studio 9.0\VC\include\vector 439
Thanks for the answers.
That really cleared up my block and got me started.
Just one thing: How can I change the project to windows?
Just changing the subsystem and main to winmain still has the same error i got at the beginning.
Aside from command line arguments, btw, is there a reason to run in a console environment?
That way you can always use a main() entry point rather than a WinMain(). It also allows you to switch subsystems by setting the define CONSOLE rather than changing the property pages.
And Panda will create a window for you regardless of the subsystem, but as rdb said, it’s convenient to have a console for development because you’ll be able to read Panda debugging messages, assertions, etc.
I’m not suggesting this will solve your problem (it may) but it may be a better starting ground, I’ve always had more luck with 1.7.0 in C++, plus that way we are using the same and I can help you better.
After adding all these directories, right click on project and select properties. In the menu that comes up select the Linker and then the Input tab. In the Additional Dependencies row add the following libraries: