问题描述
我有一个基于C ++语言的Linux VPNC一个开源。下载链接:(我用VPNC-0.5.3.tar.gz)。
i have an open source for VPNC linux based on C++ language. Download link is: http://www.unix-ag.uni-kl.de/~massar/vpnc/ (i use vpnc-0.5.3.tar.gz).
所以,我要建立所有源$ C $ c。使用的Android NDK和Cygwin在Windows上.so库。
So, i want to build all source code to .so library using android ndk and cygwin on windows.
首先,当我编译源$ C $ C在Cygwin上我有错误:grcypt.h没有这样的文件或目录和我解决它通过粘贴gcrypt.h文件夹JNI在Android项目。但我输入下面的问题:
First, when i compile the source code on cygwin i have the error: "grcypt.h no such file or directory" and i solved it by paste gcrypt.h file to jni folder on android project. But i enter the problem below:
$ /cygdrive/C/Working/Ke/Android/android-ndk-r8b/ndk-build
SharedLibrary : libvpnc.so
./obj/local/armeabi/objs/vpnc/vpnc.o: In function `lifetime_ike_process':
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:1171: undefined reference to `opt_debug'
./obj/local/armeabi/objs/vpnc/vpnc.o: In function `lifetime_ipsec_process':
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:1189: undefined reference to `opt_debug'
./obj/local/armeabi/objs/vpnc/vpnc.o: In function `make_socket':
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:242: undefined reference to `error'
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:219: undefined reference to `error'
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:231: undefined reference to `error'
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:238: undefined reference to `error'
./obj/local/armeabi/objs/vpnc/vpnc.o: In function `isakmp_crypt':
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:531: undefined reference to `xallocc'
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:532: undefined reference to `gcry_cipher_open'
C:\Working\Ke\Projects\Eclipse\AndroidVpnc/jni/vpnc.c:533: undefined reference to `gcry_cipher_setkey'
请给我这个问题的解决方案。
Please give me the solution for this problem.
非常感谢你。
推荐答案
您必须包括一个包含opt_debug,错误,xalloc,gcry_cipher_open和gcry_cipher_setkey以及图书馆。
You have to include the libraries that contains opt_debug, error, xalloc, gcry_cipher_open and gcry_cipher_setkey as well.
这篇关于构建VPNC采用Android NDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!