Question

I have a project in Qt framework where I would like to use Poco C++ HTML server implementation. I have the code in place and able to compile and run it for Linux desktop, where it works as I would expect. I would like to compile it for Android as well, but here my problem begins. I have done the following to get it to work for Android: As the project in Qt is compiled for arm (GCC 4.8) I have created a toolchain for compilation of Poco:
<NDK-R9 dir>/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$HOME/my-android-toolchain --toolchain=arm-linux-androideabi-4.8

Ran configure, make and make install. I have set up the LD_LIBRARY_PATH and would now expect Poco to be ready to use in my Qt project. When I compile my Qt project I get the following warnings/errors:
"skipping incompatible libPocoFoundation.so while searching for PocoFoundation"
"error: cannot find -lPocoFoundation"
So I guess I have not compiled the Poco library as I should in order to use it in Qt. However, I am lost how to proceed from here.
Can anyone tell me what I'm doing wrong???

Regards,

Was it helpful?

Solution

The problem is that I compiled Poco for both Linux and Android. Firstly, I compiled for Linux:

./configure --config=linux --no-tests --no-samples
make -s -j4
sudo make install

I then repeated this for Android:

./configure --config=android --no-tests --no-samples --prefix=/usr/local/android
make -s -j4
sudo make install

As I hadn't done a make clean after for the Linux config, the make install for Android config found (and copied) the compiled libs and both Linux and Android.

Unfortunately Qt then linked to the wrong libs, which explains the error message I got.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top