Syaiful Nizam Yahya
Syaiful Nizam Yahya

Reputation: 4305

Cannot build cocos2d-x 4.0 cpp-test

Im just starting with cocos2d-x. I start by following the guide here. https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/Windows.html

Regarding prerequisites:

Downloaded Cocos2dx v4 from github repo.

I run this command

python setup.py

https://i.sstatic.net/90EjP.png

Then i run this command

cd COCOS2DX/tests/cpp-tests
mkdir win32-build
cd win32-build
cmake ..

Then I rebuild the generated solution and get this error. https://i.sstatic.net/k5ciQ.png

Please advise.

Thanks.

Upvotes: 0

Views: 1200

Answers (2)

Solyman.rabiei
Solyman.rabiei

Reputation: 21

use cmake .. -G"Visual Studio 16 2019" -Tv142 -A Win32

Upvotes: 2

Orion Steel
Orion Steel

Reputation: 101

I can't quite make out details in picture, but you have failure accessing the Cocos library.

I got Cocos2d-x 3.17.2 working on VS2017 for cpp-test on Win10. The generated Win32 solution for some reason did not include the cocos library. I had to manually include libcocos2d, librecast, and libSpine projects in solution, fix dependencies and add libcocos2d resource to cpp-test project to make it compile.

As an aside, I am finding the test code quite helpful for showing how to accomplish things - just find a test doing what you are trying to do, and examine / step through the code to see how.

If you still have problems, perhaps ask for help on the Cocos2d-x forum: https://discuss.cocos2d-x.org/

Upvotes: 0

Related Questions