Unsolved Include library source in my project
-
I'm working on a modbus project and I'm having some problem with serial communication. I'd like to debug through the source code of the qtserialbus library. I got the source code from git but I don't know hot to include it in my project. I'm with win/mingw. I tried to include the serialbus project as subdir (my project has TEMPLATE = subdirs) but it won't compile because missing private headers.
Thank you for any support. -
Hi and welcome to devnet,
What version of Qt are you using ?
What OS ? -
Hi SGaist, I'm using Win 10 Pro and compiling with mingw. I'm using Qt 5.9.
Thank you
-
What do you mean by
include the source from the QtSerialBus module in your project
? -
http://doc.qt.io/qtcreator/creator-debugger-engines.html
Mapping Source Paths -
Did you download Qt's sources ?
-
I did downloaded the source of the qtserialbus library.
Thank you to Eligijus, that's almost what I was looking for. I'd like to debug the QT library class QModbusClient at first, but I also would like to modify it, to insert some debug code for instance.
Still trying... -
In that case you have to build the module and use that version with your application.
-
@SGaist: yes, thanks. But the module won't compile because some files are missing, as I wrote in my first post. Please help.
-
What exactly is missing ?
-
I downloaded source from https://github.com/qt/qtserialbus/tree/5.9.1
I got a dir qtserialbus-5.9.1 with qtserialbus.pro
Inside it there is the dir 'src' with its src.pro
Inside it there is the dir 'serialbus' with serialbus.pro
Which one should I use?
I tried to build qtserialbus.pro and I got "In file included from C:\Dropbox\Progetti\Library\qt\qtserialbus-5.9.1\qtserialbus-5.9.1\src\serialbus\qmodbusserver.cpp:39:0:
C:\Dropbox\Progetti\Library\qt\qtserialbus-5.9.1\qtserialbus-5.9.1\src\serialbus\qmodbusserver_p.h:43:40: fatal error: private/qmodbuscommevent_p.h: No such file or directory
compilation terminated" -
Can't you use the Qt installer? You would get all the libs build and included by default.
You should not compile Qt modules without configuring Qt first. Please see https://wiki.qt.io/Building_Qt_5_from_Git for detailed info on how to configure and build Qt.