移植gsoap到android

it2025-12-19  9

1、编译pc版本的gsoap

        ./configure --prefix=$PWD/out_pc

       make -j16

        make install 

错误:忘了报啥错了这里就不复制了,安装下面的软件就不会报错了;

        

apt-get install g++ apt-get install flex apt-get install bison apt-get install byacc apt-get install libssl-dev apt-get install libgtk2.0-dev libglib2.0-dev apt-get install openssl

2、编译android版gsoap

1、./configure --prefix=$PWD/out_android --host=arm-linux-androideabi --disable-c-locale

2、make -j16

错误:cstdlib:119: error: '::malloc' has not been declared 

解决方法:在成功执行configure后(在未执行configure之前找不到下列两行),修改与configure同目录下的config.h文件,将文件中的如下两行注释掉:                  #define malloc rpl_malloc                  #define realloc rpl_realloc 

错误: ../../gsoap/src/soapcpp2: cannot execute binary file

解决方法:把x86下的gsoap/src/soapcpp2文件复制一份过来,然后继续执行make,编译成功,然后再把这个文件用以前备份的替换掉,当然也可以直接删除,然后在gsoap/src/目录下执行make,重新生成即可

3、make install

最新回复(0)