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

Compile XLua with lua-rapidjson integrated #53

Closed
arthasStarNursery opened this issue May 22, 2022 · 4 comments
Closed

Compile XLua with lua-rapidjson integrated #53

arthasStarNursery opened this issue May 22, 2022 · 4 comments

Comments

@arthasStarNursery
Copy link

xLua:[v2.1.16]https://github.com/Tencent/xLua/releases/tag/v2.1.16
lua-rapidjson: [v2.1.16]https://github.com/xpol/lua-rapidjson/releases/tag/v0.7.1
cmake 3.23.1
gcc 13.1.6 (clang-1316.0.21.2.3)

xLua的CMakeLists中添加如下:

#begin lua-rapidjson
set (RAPIDJSON_SRC
lua-rapidjson/source/Document.cpp
lua-rapidjson/source/rapidjson.cpp
lua-rapidjson/source/Schema.cpp
lua-rapidjson/source/values.cpp
)
set_property(
SOURCE ${RAPIDJSON_SRC}
APPEND
PROPERTY COMPILE_DEFINITIONS
LUA_LIB
)
list(APPEND THIRDPART_INC lua-rapidjson/include)
set (THIRDPART_SRC ${THIRDPART_SRC} ${RAPIDJSON_SRC})
#end lua-rapidjson

sh make_ios_lua53.sh
编译报错:
../build/lua-rapidjson/source/values.hpp:232:10: error: calling a private
constructor of class 'rapidjson::GenericValue<rapidjson::UTF8<> >'
return details::toValue(L, idx, 0, allocator);

In file included from ../build/lua-rapidjson/source/rapidjson.cpp:16:
../build/lua-rapidjson/include/rapidjson/document.h:690:5: note: declared
private here
GenericValue(const GenericValue& rhs);

@lizhaodong2318
Copy link

楼主解决了没有?请求支援
I need help

@QinShuai0
Copy link

need help

@zhengtg
Copy link

zhengtg commented Oct 28, 2022

Android下可以编译过,应该要使用c++11才行

@arthasStarNursery
Copy link
Author

arthasStarNursery commented Nov 1, 2022

Android下可以编译过,应该要使用c++11才行

It works well. Thanks for your help!

Add the following code to the file CMakeLists.txt (cmake version 3.1+)

set(CMAKE_CXX_STANDARD 11)

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

4 participants