Hello dear Cocos2d developpers,
I am trying to test Cocos2D-x behaviour with controller, with version 3.7.1. Therefore I got all content from the default controller test in cocos2d-x-3.7.1\tests\game-controller-test\Classes that I included into a new project.
So I copied GameControllerTest.cpp and GameControllerTest.h.
Problem is that when I try to compile the whole project, I have some error from the GameControllerTest.cpp
Erreur 7 error LNK1120: 4 externes non résolus
C:\Projets\CocosTest2\MyGame\proj.win32\Debug.win32\MyGame.exe MyGame
Erreur 6 error LNK2019: symbole externe non résolu “public: static class cocos2d::EventListenerController * __cdecl cocos2d::EventListenerController::create(void)” (?create@EventListenerController@cocos2d@@SAPAV12@XZ) référencé dans la fonction “private: void __thiscall GameControllerTest::registerControllerListener(void)” (?registerControllerListener@GameControllerTest@@AAEXXZ) C:\Projets\CocosTest2\MyGame\proj.win32\GameControllerTest.obj MyGame
Erreur 3 error LNK2019: symbole externe non résolu “public: static void __cdecl cocos2d::Controller::startDiscoveryController(void)” (?startDiscoveryController@Controller@cocos2d@@SAXXZ) référencé dans la fonction “private: void __thiscall GameControllerTest::registerControllerListener(void)” (?registerControllerListener@GameControllerTest@@AAEXXZ) C:\Projets\CocosTest2\MyGame\proj.win32\GameControllerTest.obj MyGame
Erreur 4 error LNK2019: symbole externe non résolu “public: static void __cdecl cocos2d::Controller::stopDiscoveryController(void)” (?stopDiscoveryController@Controller@cocos2d@@SAXXZ) référencé dans la fonction “public: virtual __thiscall GameControllerTest::~GameControllerTest(void)” (??1GameControllerTest@@UAE@XZ) C:\Projets\CocosTest2\MyGame\proj.win32\GameControllerTest.obj MyGame
Those are non resolved external symbols, when the code call functions from the controller’s library. Therefore I assume that this is a missing include. But as I’m not yet very familiar with cocos, I can’t really figure which one.
Has someone an idea of what is missing ? Thanks by advance