![]() Mac and Linux (even though on iOS I also use OpenSSL). The C++ client worked out of the box on iOS. How can I solve this? I am using Android Studio with NDK-BUILD and am an absolute n00b when it comes to the Android build environment.īy the way … I use the C++ client and not the Cocos2d C++ client as that one gave me issues with the libwebsockets lib that is included in my cocos setup (3.17). when I remove the Boring libs i get missing references in libcpprest.when I remove the OpenSSL libs, I get errors on missing references in Curl only way to use cURL in android is to build the entire android source tree with curl in it.when I incude both the Nakama boring SSL libs and OpenSSL I get errors with duplicates.I have changed it to reflect the libraries that are included, but now I get linker errors as my app is also statically linked with OpenSSL (for libcurl, which I use heavily also). It contains references to libraries that are not included. The libcurl library is a de facto standard for native applications, which deal with numerous networking protocols. mk file for the Nakama C++ Android client. For iOS, Mac and Linux I have it working perfectly, but for Android I run into problems related to OpenSSL/BoringSSL.įirst of all I ran into issues with the. Generate executable file (throw it to the development board for testing).I am trying to get the Nakama C++ client working with my Cocos2d-x app on Android. c -o curl_test -L /home /kwt /curl /aarch /curl /lib / -lcurl Modify the curl_test.c example of using libcurl as follows: # include "/home/kwt/curl/aarch/curl/include/curl/curl.h"Ĭross compilation: aarch64 -linux -gnu -gcc curl_test. Then execute make and make install to generate /home/kwt/curl/aarch/curl. configure -host =aarch64 -linux -gnu CC =aarch64 -linux -gnu -gcc CXX =aarch64 -linux -gnu -g ++ -with -ssl -enable -shared -enable - static -disable -dict -disable -ftp -disable -imap -disable -ldap -disable -ldaps -disable -pop3 -disable -proxy -disable -rtsp -disable -smtp -disable -telnet -disable -tftp -disable -zlib -without -ca -bundle -without -gnutls -without -libidn -without -librtmp -without -libssh2 -without -nss -without -zlib -prefix = /home /kwt /curl /aarch /curl After entering the curl-7.69.1 directory, execute the following command to generate a Makefile: CPPFLAGS = "-I/home/kwt/openssl/aarch/openssl/ -I/home/kwt/openssl/aarch/openssl/include" LDFLAGS = "-L/home/kwt/openssl/aarch/openssl/lib" LIBS = "-ldl". curl_testĪlso download and install curl-7.69.1.tar.gz and decompress the installation package. Here is a simple example of using libcurl:Ĭurl_test.c: # include # include "/home/kwt/curl/include/curl/curl.h" int main ( void ) Įxecute gcc curl_test.c -o curl_test -L/home/kwt/curl/lib/ -lcurl to get the executable file, the executable file is as follows: -virtual -machine : /home /kwt /Test / 3#. 1# make installĪfter completion, a curl folder is generated under /home/kwt/, and curl is installed successfully. > I dont think this is the recommend way to build a C library for Android. ![]() virtual -machine : /home /kwt /curl - 7.69. cross-compile instead you use paths into the original NDK, muck up with a > bunch of CFLAGS and LDFLAGS, etc. Then execute make and make install: -virtual -machine : /home /kwt /curl - 7.69. Recently I need compile libcurl for different platforms, since cocos-2dx 3.0 ships with libcurl 7.26.0 and there are several fixes in newer versions according to changelog. configure command to generate Makefile: -virtual -machine : /home /kwt /curl - 7.69. gzĮnter the curl-7.69.1 directory: Enter curl - 7.69. Tar vxf curl-7.69.1.tar.gz: -virtual -machine : /home /kwt# tar vxf curl - 7.69. For details, see:įirst download the curl installation package curl-7.69.1.tar.gz and unzip the installation package: Before compiling or cross-compiling curl, you need to compile or cross-compile openssl.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |