Question

I'm trying to use QtSerialPort (http://qt-project.org/wiki/QtSerialPort) with Qt 4.8. It's not part of that version, so I have to install it manually. To avoid to manually install it, I just wanted to include the .pri file that is shipped with QtSerialPort. I got my copy by doing "git clone https://git.gitorious.org/qt/qtserialport.git". Using it in my *.pro file with:

include(qtserialport/src/serialport/serialport-lib.pri)

But compiling fails bc. of includes like:

#include <QtSerialPort/qserialportglobal.h>

So I guess these includes resolve to something like /usr/include etc. Is there any way to fix this without changing all the includes from to "foo.h" manually?

Was it helpful?

Solution

So I guess these includes resolve to something like /usr/include etc. Is there any way to fix this without changing all the includes from to "foo.h" manually?

Yes, sure.

First, you would need to write CONFIG += serialport as per documentation.

You could also specify the includepath to the qtserialport clone on your system.

You would still need to get the library built, but I assume that you are aware of it.

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