Using headers and libraries, when porting to Android
-
Hello!
I'm a newbie in cross-platforming programming with Qt 5. Now I'm trying to compile project for Android. Please, help me with several questions:-
I got a problem with net function ntohs(); as I considered because of using headers from host platform (Ubuntu 64-bit), not target. What should I do to use target headers?
-
I must link several libraries (in gcc flags: -lX11 -lm -ldl -lpthread). What should I do to use it in Android?
If you have some links referred to above questions, please share.
Thanks! -
-
Hi, I don't familiar with Ubuntu, but there are something I could tell you
1 : the function ntohs() may not support android platform, if you need network function, try the network module provide by Qt5.2
2 : Have you setup the paths correctly?
You have to download ndk, sdk, ant and jdk before you could develop the apps."tutorial":http://doc-snapshot.qt-project.org/qdoc/android-support.html
some example on mac
"setting on mac":http://qtandopencv.blogspot.com/2013/11/deploy-qt-apps-to-android-phone-on-mac.html