ocrespo / VNCpp

A android vnc client powered by libVNCserver
Other
32 stars 25 forks source link

ndk-build failed when set x86 #4

Open huichengongzi opened 9 years ago

huichengongzi commented 9 years ago

When I add "APP_ABI := armeabi armeabi-v7a x86" in jni/Application.mk , then run ndk-build , but I get build error .

"Compile++ x86 : vncmain <= ClientScreen.cpp "Compile++ x86 : vncmain <= HandlerRFB.cpp "Compile++ x86 : vncmain <= ClientConnectionRFB.cpp "Compile++ x86 : vncmain <= Vnc.cpp "Compile++ x86 : vncmain <= ObservableJNI.cpp "Compile++ x86 : vncmain <= JavaBridge.cpp SharedLibrary : libvncmain.so E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::eventLoop(void):E:/Sundata/app/vnc /VNCpp-master/VNCpp//jni/src/model/comunication/ClientConnectionRFB.cpp:210: err or: undefined reference to 'WaitForMessage' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::eventLoop(void):E:/Sundata/app/vnc /VNCpp-master/VNCpp//jni/src/model/comunication/ClientConnectionRFB.cpp:217: err or: undefined reference to 'HandleRFBServerMessage' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::cleanRfb():E:/Sundata/app/vnc/VNCpp -master/VNCpp//jni/src/model/comunication/ClientConnectionRFB.cpp:186: error: un defined reference to 'rfbClientCleanup' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::iniConnection(char, int, char, in t, int, bool):E:/Sundata/app/vnc/VNCpp-master/VNCpp//jni/src/model/comunication/ ClientConnectionRFB.cpp:92: error: undefined reference to 'rfbGetClient' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::iniConnection(char, int, char, in t, int, bool):E:/Sundata/app/vnc/VNCpp-master/VNCpp//jni/src/model/comunication/ ClientConnectionRFB.cpp:120: error: undefined reference to 'rfbInitClient' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::sendMouseEvent(int, int, MouseEvent ):E:/Sundata/app/vnc/VNCpp-master/VNCpp//jni/src/model/comunication/ClientConnec tionRFB.cpp:261: error: undefined reference to 'SendPointerEvent' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::sendMouseEvent(int, int, MouseEvent ):E:/Sundata/app/vnc/VNCpp-master/VNCpp//jni/src/model/comunication/ClientConnec tionRFB.cpp:262: error: undefined reference to 'SendPointerEvent' E:/android/android-ndk-r8e/toolchains/x86-4.6/prebuilt/windows/bin/../lib/gcc/i6 86-linux-android/4.6/../../../../i686-linux-android/bin/ld.exe: E:/Sundata/app/v nc/VNCpp-master/VNCpp//obj/local/x86/objs/vncmain/model/comunication/ClientConne ctionRFB.o: in function ClientConnectionRFB::sendKeyEvent(int, bool):E:/Sundata/ app/vnc/VNCpp-master/VNCpp//jni/src/model/comunication/ClientConnectionRFB.cpp:2 78: error: undefined reference to 'SendKeyEvent' collect2: ld returned 1 exit status make: *\ [E:/Sundata/app/vnc/VNCpp-master/VNCpp//obj/local/x86/libvncmain.so] E rror 1

E:\Sundata\app\vnc\VNCpp-master\VNCpp\jni>

huichengongzi commented 9 years ago

Can anyone help me , Thanks !

ocrespo commented 9 years ago

Hello,

The problem it's that the libraries are not compiled to x86 architecture, it's only for arm so if you wish to use x86 you need to compiled or add pre-compiled dependencies libraries to the project.

X86 it's a very common architecture so you shouldn't have any problem founding the libraries.

Thanks

huichengongzi commented 9 years ago

ok , I will try it . Thank you all the same .

huichengongzi commented 9 years ago

Hello , http://stackoverflow.com/questions/33117097/java-lang-unsatisfiedlinkerror-dlopen-failed-unknown-reloc-type-42 Do you know the reason of dlopen failed: unknown reloc type 42 ? Any suggestions will be appriciated .