Running cocos2d-x 3.3 app to windows XP

Hello
I built cocos2d-x 3.3 + lua app for windows XP.
But it shows "can not find the entrance was unable to locate the program Enter the point GetTickCount64 in the dynamic link library KERNEL32.dll"

Can’t I run cocos2d-x 3.3 app to windows XP?
Do you have any advice?

GetTickCount64 is not supported in Windows XP, as you found out already:

If you have access to the source code, then do a search for GetTickCount64, and see where it’s being used.

You will need to add something like this to fix it:

#if WINVER < 0x0602
ULONGLONG GetTickCount64() { return GetTickCount(); }
#endif
1 Like

Thank you for your reply @R101
As I check GetTickCount64() is using from libcurl prebuild dll.
So need to build again libcurl dll.
Do you know which version of curl is using in cocos2d-x 3.3?
Thank you

I’m not sure entire sure. Check the curlver.h file in your source code:

[cocos root folder]\external\curl\include\win32\curl\curlver.h

The specific issue and fix is in the curl repo, so maybe you can merge it into that specific version and recompile it if you can’t use a newer version:

1 Like

I think you don’t need to recompile libcurl.
Just try to implement GetTickCount64 as @R101 suggested

1 Like

The /curl/lb/timeval.c file should already have the correct code, but the build process requires certain defines to be passed to the compiler in order for it to compile the right section of code.

A recompilation is required to build a compatible version of the curl library, with the following define passed to the compiler (as detailed in the github issue I linked above):

_WIN32_WINNT=0x0501

1 Like

Hi @R101
I just checked again and GetTickCount64() error is because of websocket.dll
It seems cocos2d-x 3.3 websocket dll is using GetTickCount64() function in windows XP.
I am trying to rebuild websocket.dll for windows XP
If you have any precious ideas, please let me know

Yes, you’re experiencing the issue in websockets.dll, but not because of the websockets source directly. It’s because openssl is being statically linked into the websockets library, which is where the actual GetTickCount64() exists. I’ve searched the websockets code and there is no trace of the GetTickCount/GetTickCount64 call.

I can’t find any tags on github for the external library source code v3-deps-29, which is what Cocos2d-x v3.3 uses. I can only see a tag for v3.4, and that’s here:

cocos2d-x-3rd-party-libs-src v3.4

You can try using that specific source tag, and build it with the fix to GetTickCount() (as described in my previous post above).

Is it possible for you try out the latest version of the external libs to see if it works? v3-deps-158.zip

If v3-deps-158 works with Cocos2d-x v3.3, but it still crashes on GetTickCount64(), that’s alright, because at least now you know you can use the latest source code to compile with the fix.

1 Like

Thank you for your many help @R101
I resolve it.

Can I ask another question?
I am using VS2013 and cocos2d-x 3.3
And I build my game with release, and it works well in my PC (windows 10)
But when I copy game to Windows 7 (64bit), game not working.
It shows “msvcr100.dll file is missing”.
As I check, cocos2d-x 3.3 win32 external prebuild libcurl.dll, websocket.dll are using msvcr100.dll
So I download msvcr100.dll from http://www.dlldownloader.com/msvcr110-dll/download/ and copy it to game directory and run game again on windows 7 machine.
But it is crashes.
Do you have any ideas?

@Jang_Wei try to install Visual C++ Redistributable Packages for Visual Studio 2013

2 Likes



image

Already installed, but still error occurs

Maybe you need Microsoft Visual C++ 2010 Redistributable Package (x86)

1 Like

Thank you for your reply.
If I install 2010 Redistributable Package, it works.
Many thank you!!!
It resolved

I think problem is because of remote app running.
I think cocos2d-x windows desktop game cant run if I run via teamview.
I was running game via teamview, I install VMware, and tested, it works well in VMware.

Thank you

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.