c++ - howto use the libcurl by ndk standalone tool chainon on android -


now, have question: first of ndk standalone tool chain ---arm-linux-androideabi-g++ sucessful; have write commandline c++ program use libcurl http requests, can successful compile on mac( has libcurl default? ) use g++, when use arm-linux-androideabi-g++ compile it, produce following error:

arm-linux-androideabi-g++ -std=c++11 -lcurl upload.cpp -o upload  upload.cpp:12:23: fatal error: curl/curl.h: no such file or directory compilation terminated  

i have libcurl(include files , .a lib file) can used in android, howto configure arm-linux-androideabi-g++ can compile successfully? advance

i guess include header like

#include <curl/curl.h> 

if that, arm-linux-androideabi-g++ searches header file in specific location. , if arm-linux-androideabi-g++ not point same directory g++, headers can not found. try copy header files of curl project, jni/curl folder, , use " instead of <

#include "curl/curl.h" 

if have right .a file, functions in header files pointed lib file successfully.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -