Issue Running QT 5.3 application on Windows XP (msvc2013)



  • I'm having an issue with my application running on Windows XP. It's built using QT5/msvc2013.

    Originally, I was getting an error that indicated it wasn't a valid win32 application. To fix this, I added a Windows environment variable LINK=/SUBSYSTEM:WINDOWS,5.01. That fixed the original issue, but now when I launch the application, I get an error "The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll." I read up on this, and it sounds like it was an issue with VS 2012, but is not an issue with VS 2013. I ran Dependency Walker on the .exe, and it looks like it's being called from KERNEL32.DLL.

    Why would I be getting this error when I'm building the application with msvc2013? Is there any way I can get more information about what could be causing this?



  • Hi it seems to be related to what Platform SDK you have on your PC, see this "blog post":http://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/

    You could try what he suggests, adding the env. variable _ATL_XP_TARGETING and rebuild, hopefully it will eliminate the dependency on InitializeCriticalSectionEx.

    I also build Qt apps for XP using MSVC2013, on a Win7 PC, but I haven't seen this error. Perhaps you're using Windows 8? And also, have you applied any of the updates to MSVC2013 (I have not)?



  • It worked! I added _ATL_XP_TARGETING as a define in my .pro file, and it launches fine now. Thanks a lot for your help.



  • Great! You know, I'm thinking now of updating my blog post about how to fix that InitializeCriticalSectionEx error, perhaps others will be stuck with this.
    If you have the time, could you make a screen shot of the dialog box with that error? Would make my blog post look neater :-)



  • Sure! Here it is: http://i.imgur.com/AB7Gn9M.png



  • Thank you! Blog post now has one more nice picture.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.