🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Compiling AngelScript at VC++ 2008

Started by
1 comment, last by Schrompf 16 years, 7 months ago
Hi, just a hint for those who try to build AngelScript with the new Visual Studio 2008 published lately. If you load an old solution from VC++ 2005 (VC8) into the new Visual Studio 2008 (VC9) and try to compile it, you'll encounter a strange error deep inside the CRT includes. It sounds like this:

1>as_scriptengine.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(358):
    error C3163: '_vsnprintf': attributes inconsistent with previous declaration
1>        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(350) : see declaration of '_vsnprintf'
I googled a while for this problem and found that some other libraries expose the same problem when being built with VC9. For AngelScript, the solution to this is quite simple, though: Comment out the following line found in as_config.h at line 282

	#define vsnprintf(a, b, c, d) _vsnprintf(a, b, c, d)


When commented out, AngelScript does build and run fine off of VC9. Hope that helps. Bye, Thomas [edit] Added a line break to avoid trashing the site layout
----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.
Advertisement
Thanks for the tip. I'll have to update the as_config.h to detect the VC9 version.

Could you verify the value of the _MSC_VER macro for me? I'm guessing it would be 1500.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Exactly: _MSC_VER == 1500
----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.

This topic is closed to new replies.

Advertisement