Cocos 3.13.1 project to build exe on Win7 for Windows XP - any chance?

The result exe started on Win XP prompts the message: “The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll” - Seems the problem is, what InitializeCriticalSectionEx() appeared later than XP obsolete :frowning: Any hint?

You need recompile any dependencies 3rd libs with Visual Studio 2015 xp(Especially: libcurl & libwebsockets)

And modify the engine source code: CCConsole.cpp like: cocos2d-x/CCConsole.cpp at v3 · halx99/cocos2d-x · GitHub

Use above way, I build exe on windows 10 for windows xp successfully. the case is: http://en-us.x-studio365.com

1 Like

Thanks, but no success, the same error (built on Win7 VS2015). I even tried to delete manually proj.win32\Debug.win32 folder and then even cocos2d\cocos\2d\Debug.win32

Also I manually defined:
#define WINVER _WIN32_WINNT_WINXP
#define _WIN32_WINNT _WIN32_WINNT_WINXP

I remember the libcurl.dll which provided by official engine contains “InitializeCriticalSectionEx”:

Do you really confirm, you recompile libcurl with platform toolset “Visual Studio 2015 - Windows XP(v140_xp)”?

And I compiled is not contains: libcurl.zip (150.3 KB)

1 Like

Yes.


I even tried

Ok, thank you all. Your libcurl.dll helped to push forward, but i stopped on other dll error; will just use another PC to run app to record the video with sound (the main task).

If you build exe on Win7 for Windows XP, I suggest you config the Release not Debug:

And not need select MTd, just select Md for Release mode, then install Visual Studio 2015 redist on Windows XP