Ich versuche, es zu kompilieren
Code: Select all
mkdir build
cmake .. \
-DCMAKE_C_COMPILER=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/clang \
-DCMAKE_CXX_COMPILER=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android34-clang++ \
-DCMAKE_C_FLAGS="-I/home/ripper/android-ndk/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include" \
-DCMAKE_CXX_FLAGS="-I/home/ripper/android-ndk/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include" \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM=android-34 \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=/home/ripper/sources_pck/android_libs/mysql-connector-cpp \
-DWITH_SSL=/home/ripper/sources_pck/android_libs/openssl-3.4.0-android/lib/libssl \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_UNIT_TESTS=OFF \
-DWITH_EXAMPLES=OFF \
-DWITH_JDBC=OFF
and after run make
== Extrnal build done
[ 2%] Built target zstd-build
[ 4%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/error.cc.o
[ 5%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/stream.cc.o
[ 6%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/connection_tcpip.cc.o
[ 8%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/socket.cc.o
[ 9%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/diagnostics.cc.o
[ 10%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/socket_detail.cc.o
/home/ripper/sources_pck/mysqlcpp/mysql-connector-cpp/cdk/foundation/socket_detail.cc:1097:22: error: variable has incomplete type 'struct __res_state'
1097 | struct __res_state state {};
| ^
/home/ripper/sources_pck/mysqlcpp/mysql-connector-cpp/cdk/foundation/socket_detail.cc:1097:10: note: forward declaration of '__res_state'
1097 | struct __res_state state {};
| ^
1 error generated.
make[2]: *** [cdk/foundation/CMakeFiles/cdk_foundation.dir/build.make:149: cdk/foundation/CMakeFiles/cdk_foundation.dir/socket_detail.cc.o] Помилка 1
make[1]: *** [CMakeFiles/Makefile2:1055: cdk/foundation/CMakeFiles/cdk_foundation.dir/all] Помилка 2
make: *** [Makefile:136: all] Помилка 2
Auf diese Weise habe ich bereits OpenSSL- und Curl-Bibliotheken erstellt und verbessert lib Ich habe OpenSSL und Curl ausprobiert, die zumindest die lib-Version auflösen können, testet nicht tiefgreifend.
Ich habe den Quellcode ein wenig bearbeitet und jetzt habe ich Probleme mit dem Kompilieren von lib mit Protokoll Ich habe die Bibliothek bereits vorkompiliert ... aber ich kann sie nicht einfach zum Projekt hinzufügen und nach ausführbaren Dateien fragen ... /usr/protobuf-android-x86_64/bin/protoc-30.0.0: Fehler beim Laden gemeinsam genutzter Bibliotheken: /lib/ x86_64-linux-gnu/libm.so: Ungültiger ELF-Header – es ist ein vorkompilierter
ELF 64-Bit-LSB-Kuchen ausführbare Datei, x86-64, Version 1 (SYSV), dynamisch verknüpft, Interpreter /system/bin/linker64, mit debug_info, nicht entfernt
Code: Select all
[1%] Building CXX object CMakeFiles/save_linker_opts.dir/cmake/libutils/save_linker_opts.cc.o
[ 2%] Linking CXX executable libutils/save_linker_opts
[ 2%] Built target save_linker_opts
[ 4%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/error.cc.o
[ 5%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/stream.cc.o
[ 6%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/connection_tcpip.cc.o
[ 8%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/socket.cc.o
[ 9%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/diagnostics.cc.o
[ 10%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/socket_detail.cc.o
[ 12%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/connection_openssl.cc.o
[ 13%] Linking CXX static library libcdk_foundation.a
[ 13%] Built target cdk_foundation
[ 15%] Preparing protobuf files for protobuf-lite
[ 16%] Running C++ protocol buffer compiler on /home/ripper/sources_pck/mysql-connector-c++-9.1.0-src/build/cdk/protocol/mysqlx/lite/mysqlx_sql.proto
/bin/sh: 1: /home/ripper/sources_pck/android_libs/protobuf-android-x86_64/bin/protoc: not found
make[2]: *** [cdk/protocol/mysqlx/CMakeFiles/cdk_proto_mysqlx.dir/build.make:155: cdk/protocol/mysqlx/protobuf/mysqlx_sql.pb.cc] ERROR 127
make[1]: *** [CMakeFiles/Makefile2:1063: cdk/protocol/mysqlx/CMakeFiles/cdk_proto_mysqlx.dir/all] ERROR 2
make: *** [Makefile:136: all] ERROR 2