Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Windows XP Compatibility


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Jason Goepel   Members   -  Reputation: 402

Like
0Likes
Like

Posted 19 February 2014 - 10:18 AM

AngelScript will no longer run on Windows XP (using VS2013 and the v120 Windows XP platform toolset).  The project builds fine, but when loading on Windows XP there is a link error attempting to find InitializeCriticalSectionEx in kernel32.dll (I think).

 

I found that in order to maintain compatibility with Windows XP I needed to define a special preprocessor macro indicating the WINXP target.  I used "AS_WINXP" for this purpse.  You will see it in the attached patch.

 

 

Attached Files



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3291

Like
0Likes
Like

Posted 19 February 2014 - 01:54 PM

It shouldn't be necessary to have a special preprocessor macro. InitializeCriticalSectionEx() should only be used when compiling for Windows Store, any other Windows platform should be using the older InitializeCriticalSection(). I'll review the preprocessor macro that is already used to see why it might not be working correctly for WinXP target.


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

#3 Jason Goepel   Members   -  Reputation: 402

Like
0Likes
Like

Posted 19 February 2014 - 02:10 PM

I saw that was your intention, but I wasn't familiar enough with "WINAPI_FAMILY" and "WINAPI_PARTITION_DESKTOP" to deal with them.

 

In my headers, however, I saw:

#define WINAPI_FAMILY_PC_APP      2     /* Windows Store Applications */
#define WINAPI_FAMILY_PHONE_APP   3     /* Windows Phone Applications */
#define WINAPI_FAMILY_DESKTOP_APP 100   /* Windows Desktop Applications */

#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP

#define WINAPI_PARTITION_DESKTOP   (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)


So, it looks like your guard becomes

#if defined(_MSC_VER) && !(100 & 1)

I have attached what my compiler produces when preprocessed to a file.

 

Attached Files



#4 _Vicious_   Members   -  Reputation: 240

Like
0Likes
Like

Posted 19 February 2014 - 04:27 PM

It's pretty much the same with CreateSemaphoreEx:

 

http://www.warsow.net/forum/thread/t/223185#post-223185



#5 Andreas Jonsson   Moderators   -  Reputation: 3291

Like
0Likes
Like

Posted 19 February 2014 - 06:34 PM

Please try revision 1847. 

 

It should work on WinXP now.


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

#6 Jason Goepel   Members   -  Reputation: 402

Like
0Likes
Like

Posted 21 February 2014 - 10:12 AM

Confirmed.  It now runs on WinXP.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS