From 09ec643cf97d71cc49a61c2dffe518bc8d71efe7 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 2 May 2020 14:14:29 +0200 Subject: [PATCH] Fixes for Creature C Interface construct method having C++ classes. --- CInterface/Battling/Creature.cpp | 2 +- CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CInterface/Battling/Creature.cpp b/CInterface/Battling/Creature.cpp index 6ebee8f..146673a 100644 --- a/CInterface/Battling/Creature.cpp +++ b/CInterface/Battling/Creature.cpp @@ -8,7 +8,7 @@ export uint8_t CreatureLib_Creature_Construct(Creature*& out, const BattleLibrar const CreatureLib::Library::SpeciesVariant* variant, uint8_t level, uint32_t experience, uint32_t uid, CreatureLib::Library::Gender gender, uint8_t coloring, const CreatureLib::Library::Item* heldItem, - std::string nickname, bool secretTalent, const uint8_t talent, + const char* nickname, bool secretTalent, uint8_t talent, LearnedAttack* attacks[], size_t attacksNum) { Try(auto attacksVec = List(attacks, attacks + attacksNum); out = new Creature(library, species, variant, level, experience, uid, gender, coloring, heldItem, nickname, diff --git a/CMakeLists.txt b/CMakeLists.txt index f85ddf4..70bc087 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,10 +18,10 @@ if (NOT EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) endif () if (NOT WINDOWS) execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated - -s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION}) + -s compiler=clang -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -o *:shared=True) else () execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --install-folder=${CMAKE_BINARY_DIR} --build outdated - -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -s os=Windows) + -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=${VERSION} -s os=Windows -o *:shared=True) endif () endif () include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)