赞
踩
过程参考:https://wiki.strongswan.org/projects/strongswan/wiki/AndroidVPNClientBuild
安装所需要的软件包:参考:https://wiki.strongswan.org/projects/strongswan/repository/entry/HACKING
For interested developers, we have a public repository. To check out and compile
the code, you need the following tools:
- Git
- a recent GNU C compiler (>= 3.x)
- automake
- autoconf
- libtool
- pkg-config
- gettext
- perl
- python
- lex/flex
- yacc/bison
- gperf
注意:缺少一个软件包都不能编译成功
路径下面两个都可以:
git://git.strongswan.org/strongswan.git
https://github.com/strongswan/strongswan/tree/master
git clone git://git.strongswan.org/strongswan.git
我直接从其他地方下载的,复制到/strongswan/src/frontends/android/app/src/main/jni目录下
也可以按照文档中说的:
git clone git://git.strongswan.org/android-ndk-openssl.git -b ndk-static jni/openssl
cd strongswan
./autogen.sh
./configure
make dist
编译成功后导入android studio中编译运行,在这个过程,我遇到了好多问题,主要原因都是第一步准备工作中的软件包没有下载完全。
1)缺少oid.h文件
Error:make: *** No rule to make target `/strongswan/src/frontends/android/app/src/main/jni/../../../../../../..//src/libstrongswan/asn1/oid.c', needed by `/strongswan/src/frontends/android/app/src/main/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。