1
votes

Is it possible to compile Poco libs such that I can use them on Raspberry Pi with my Qt project? Currently I have my Qt project up and running on Raspberry Pi except for the functions using Poco. I thought that I could compile Poco directly on Raspberry Pi and just copy the compiled libs and header files to my Ubuntu machine, which does the compiling of my Qt project. I included

INCLUDEPATH += /path/to/poco/libs/compiled/for/raspberrypi/include  
DEPENDPATH += /path/to/poco/libs/compiled/for/raspberrypi/include  
LIBS += -L/path/to/poco/libs/compiled/for/raspberrypi -lPocoFoundation -lPocoNet  
target.path = /home/pi/path/to/my/executable  
INSTALLS += target

in my .pro file.

But I get the following error the first time the compiler encounters a Poco include:

/home/jon/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -g -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_PLUGIN -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g++ -I../../../BeatQtPlayer/src/pocowebserverplugin -I../../../BeatQtPlayer/src -I/home/jon/tmp/BeatQtPlayer/src/pocowebserverplugin/../../external_tools/poco-1.4.6p2/lib_raspberrypi/include -I/mnt/rasp-pi-rootfs/usr/local/qt5pi/include -I/mnt/rasp-pi-rootfs/usr/local/qt5pi/include/QtNetwork -I/mnt/rasp-pi-rootfs/usr/local/qt5pi/include/QtCore -I. -I. -o pocowebserverplugin.o ../../../BeatQtPlayer/src/pocowebserverplugin/pocowebserverplugin.cpp In file included from ../../../BeatQtPlayer/src/pocowebserverplugin/pocowebserverplugin.h:5:0, from ../../../BeatQtPlayer/src/pocowebserverplugin/pocowebserverplugin.cpp:1: ../../../BeatQtPlayer/src/pocowebserverplugin/requesthandler.h:4:48: fatal error: Poco/Net/HTTPRequestHandlerFactory.h: No such file or directory compilation terminated.

2

2 Answers

0
votes

These are the include paths your compiler is looking at. Is Poco/Net in there somewhere?

-I/usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g++ 
-I../../../BeatQtPlayer/src/pocowebserverplugin 
-I../../../BeatQtPlayer/src 
-I/home/jon/tmp/BeatQtPlayer/src/pocowebserverplugin/../../external_tools/poco-1.4.6p2/lib_raspberrypi/include 
-I/mnt/rasp-pi-rootfs/usr/local/qt5pi/include 
-I/mnt/rasp-pi-rootfs/usr/local/qt5pi/include/QtNetwork 
-I/mnt/rasp-pi-rootfs/usr/local/qt5pi/include/QtCore 
-I. 
-I. 
1
votes

Ensure that you have set up your include paths for the Poco library itself correctly. Poco internal headers may need other directories than the root '/path/to/.../include/' path to be included into the include path.