Issue build and run with Visual Studio 2017

Issue build and run with Visual Studio 2017
0.0 0


Hi to everyone, i’am Ale and i’am new in Cocos2d-x.

After i build my project for win32 with the command:
cocos deploy -p win32 -m release
I receive an error message that says that is impossible to complete the operation.

When i try to run an example project in Visual Studio 2017 i receive an error message that says:
'WinSock32 not found'

What i do wrong?

Thanks in advance.


Does anyone have any idea?


I need help, please anyone nave an idea?


Hi Ale!

Usually it is good practice to specify the version of the engine that you are using.

Can you build the project in debug mode?

I am using cocos2d-x 3.15.1, Win 10 and Visual Studio 2017. And I am able to build a win32 project.

Open the project in Visual Studio, then retarget the solution (right click on the solution -> Retarget solution) and build it.
You may need to download some packages, see the Error list if there is one.

If you see an error with a mention of msvcr110.dll, then you need to download Microsoft Visual C++ Redistributable 2012.

Link for x64.
Link for x86.


Hi Minggo!

I find it strange that this msvcr110.dll is required, I use Visual Studio 2017 to build the project, not Visual Studio 2012.
Could you take a look at this, please?


I don’t have win10, just have win7. And there is not problem using VS2017 on win7.


Thanks for the reply!

So you just create a new project using the cocos console, then open it in Visual Studio 2017 and build it?

Do you use win32 project?
Do you use Retarget solution? (In fact, Visual Studio does not allow me to build the project if I do not do Retarget solution.)

I create a new project, I open it in Visual Studio and get this. Is this normal?


And if I do not have the msvcr110.dll, I get the error then.


Do you still have the problem?


you need use vs2017 to recompile any third party which are prebuilt with old msvc less than vs2015.
I did this work.
Why somebody win7 is ok, because some softwares will install old msvc redists on his system. IF you use a pure win7 or win 10 with vs2017 installed, this issue will always present.


I’m sorry, but
How can I recompile it?
If I create a new project, is there something compiled inside it?


just download the source code of 3rd party, and compile with vs2017, I did at here:


Thank you! I will try.

The only thing that confuses me is that I did not have such a problem with Visual Studio 2015.


Many thanks for the answer.

I use cocos2d-x 3.15 and Visual Studio 2017 on Windows 7.

Now i have another issue, i can’t open the cocos2d-x project because Visual Studio crash.

I try to reinstall it.


When i change the option:

Tools > Options : Text Editor > C/C++ > Experimental : Enable Faster Project Load

to false in a cocos2d-x project Visual Studio 2017 crash.

Someone can help me?


I think you should report this issue to microsoft connect.



Since @halx99 kindly explained what the problem is, then
Is it possible to will download the third party package, which compiled with a newer Visual Studio?
Since Visual Studio 2017 is the actual version now, it seems reasonable.

Should I create an issue?


It is a huge work. And currently cocos2d-x supports VS2013, VS2015, every VS version needs its own version of 3rd party library, and may even include debug and release version. So i think cocos2d-x should just supports one VS version. May be we should create a new topic to discuss it.


But msvcr110.dll is about Visual Studio 2012.
Maybe you could use VS2013 to compile then, because it is easier to find and download.

Why do we need to create a new topic? This seems to be a direct consequence of the user’s problem.
I will create a new topic if you want though.


Ok, let’s use this ticket. VS2015 can not link some libs built by VS2013, because the library is tightly links with the runtime lib of VS version.

If we can just use one version of 3rd party lib for all VS versions, then i think this issue doesn’t exist.


And we can not use VS2015 or VS2017 to compile the third party package because it will break compatibility for users who use the VS2013?


Yep. As i practiced, especially if the codes are written in c++. If the libraries can work, then why we should rebuilt 3rd party libs with VS2017?


I think cocos2d-x team should only focus on one VS version. Only provide one version 3rd parties, only test one VS version. We don’t want to put more energy on VS version compatibility issues. I planed support only VS2015 since cocos2d-x supported it for a long time, and we don’t have to rebuild all 3rd party libraries.