Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #20798

Open
Heinrich-XIAO opened this issue Jun 15, 2024 · 1 comment
Open

Build Error #20798

Heinrich-XIAO opened this issue Jun 15, 2024 · 1 comment

Comments

@Heinrich-XIAO
Copy link

  • cocos2d-x version: 3.17.2-current
  • devices test on: Macbook Air Building on Asahi Linux Fedora Remix 40 GNOME

Steps to Reproduce:

  1. Download the zip file.
  2. mkdir build
  3. cd build
  4. cmake ..
  5. make (this is where the the error is)
In file included from /home/heinrichxiao/Downloads/cocos2d-x-3.17.2/external/recast/../json/document-wrapper.h:13,
                 from /home/heinrichxiao/Downloads/cocos2d-x-3.17.2/cocos/3d/CCBundle3D.h:32,
                 from /home/heinrichxiao/Downloads/cocos2d-x-3.17.2/cocos/3d/CCAnimation3D.cpp:27:
/home/heinrichxiao/Downloads/cocos2d-x-3.17.2/external/recast/../json/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/home/heinrichxiao/Downloads/cocos2d-x-3.17.2/external/recast/../json/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~~^~~~~~~~~~~~
make[2]: *** [engine/cocos/core/CMakeFiles/cocos2d.dir/build.make:1112: engine/cocos/core/CMakeFiles/cocos2d.dir/3d/CCAnimation3D.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:718: engine/cocos/core/CMakeFiles/cocos2d.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
@Assemberist
Copy link

Hello, i'm also tried to build it on HP with Manjaro linux (VMware) and meet this build problems.
I have used next WA:
GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; const int ptr& = length; const_cast<int&>(ptr) = rhs.length; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants