Menu

#3 worms.cpp from examples won't build in MSVC 2008/2010

open
nobody
None
5
2012-05-05
2012-05-05
Matt Lo
No

At the beginning of the worms.cpp, there is a condition judge to include windows.h:

#ifdef WIN32
#include <windows.h>
#endif

It should be refined to:

#if defined(_WIN32) || defined(WIN32)
#include <windows.h>
#endif

Since recent MSVC doesn't set a predefined macro 'WIN32' anymore, it set '_WIN32' instead.
After done this, worms and build/run perfectly in both MSVC 2008/2010. (of cause, have to setup glut & opengl properly)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.