Answer the question
In order to leave comments, you need to log in
How to properly build Cocos2d-x under linux?
I collect, so Cocos2d-x 15.1. And I always get a linking error when building cpp-tests. Google didn't help.
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/SpineTest/SpineTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/Scene3DTest/Scene3DTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/Sprite3DTest/DrawNode3D.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/Sprite3DTest/Sprite3DTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/SpritePolygonTest/SpritePolygonTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/SpriteTest/SpriteTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TerrainTest/TerrainTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TextInputTest/TextInputTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/Texture2dTest/Texture2dTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TextureCacheTest/TextureCacheTest.cpp.o
[ 80%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TexturePackerEncryptionTest/TextureAtlasEncryptionTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TileMapTest/TileMapTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TileMapTest/TileMapTest2.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TouchesTest/Ball.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TouchesTest/Paddle.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TouchesTest/TouchesTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/TransitionsTest/TransitionsTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIRadioButtonTest/UIRadioButtonTest.cpp.o
[ 81%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp.o
/home/darkhole/Загрузки/cocos2d-x-3.15.1/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp: In member function ‘virtual bool UIPageViewTest::init()’:
/home/darkhole/Загрузки/cocos2d-x-3.15.1/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp:89:102: warning: ‘void cocos2d::ui::PageView::addEventListenerPageView(cocos2d::Ref*, cocos2d::ui::SEL_PageViewEvent)’ is deprecated (declared at /home/darkhole/Загрузки/cocos2d-x-3.15.1/cocos/ui/UIPageView.h:249) [-Wdeprecated-declarations]
pageView->addEventListenerPageView(this, pagevieweventselector(UIPageViewTest::pageViewEvent));
^
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIScene.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp.o
[ 82%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/CocoStudioGUITest/UITabControlTest/UITabControlTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UITest/UITest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UnitTest/RefPtrTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UnitTest/UnitTest.cpp.o
[ 83%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/UserDefaultTest/UserDefaultTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/VisibleRect.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/VibrateTest/VibrateTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/ZwoptexTest/ZwoptexTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/SpriteFrameCacheTest/SpriteFrameCacheTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/controller.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/VRTest/VRTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/proj.linux/main.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/WindowTest/WindowTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/Physics3DTest/Physics3DTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp.o
[ 84%] Building CXX object tests/cpp-tests/CMakeFiles/cpp-tests.dir/Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp.o
[ 85%] Linking CXX executable ../../bin/cpp-tests/cpp-tests
/usr/bin/ld: ../../../../external/websockets/prebuilt/linux/64-bit/libwebsockets.a(libwebsockets.c.o): нераспознанное перемещение (0x2a) в разделе «.text»
/usr/bin/ld: final link failed: Некорректное значение
collect2: error: ld returned 1 exit status
tests/cpp-tests/CMakeFiles/cpp-tests.dir/build.make:3369: ошибка выполнения рецепта для цели «bin/cpp-tests/cpp-tests»
make[2]: *** [bin/cpp-tests/cpp-tests] Ошибка 1
CMakeFiles/Makefile2:658: ошибка выполнения рецепта для цели «tests/cpp-tests/CMakeFiles/cpp-tests.dir/all»
make[1]: *** [tests/cpp-tests/CMakeFiles/cpp-tests.dir/all] Ошибка 2
Makefile:83: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question