PDA

View Full Version : I have this problem when building STATIC: "Unknown module(s) in QT: serial"



Alex22
12th November 2016, 15:05
Hi
I am using QSerialPort library in my project. I have no problem when building DYNAMIC. But, while it is building STATIC, it gives this error: "Project ERROR: Unknown module(s) in QT: serialport".

my Qt version is: Qt5.5.1

I did these works too:
1- adding #include <QSerialPort> and #include <QSerialPortInfo> to my Class
2- adding QT += core gui serialport into .pro file

Please help me to build my project Statically.

adutzu89
13th November 2016, 13:14
From my knowledge Qt Open-Source version cannot build statically.

anda_skoa
13th November 2016, 15:35
From my knowledge Qt Open-Source version cannot build statically.

The license doesn't have any impact on the code or its capabilities.
Static vs. dynamic build is a setting at the configure stage.

Cheers,
_

ChrisW67
14th November 2016, 19:49
Looks like your static Qt library does not have the Qt serial port module built and your dynamic library does.

Alex22
17th November 2016, 21:10
Looks like your static Qt library does not have the Qt serial port module built and your dynamic library does.

Thanks for replyiing. I built QSerialPort by Qt Creator in static and the problem is solved now.

d_stranz
18th November 2016, 04:29
From my knowledge Qt Open-Source version cannot build statically.

As anda_skoa said, the license has no impact on how the libraries are built. However, Qt Open Source is LGPL, so a program linked to statically to Qt cannot legally be sold as a commercial product. Alex22 should be aware of this if his program is not GPL.

Alex22
18th November 2016, 07:15
Alex22 should be aware of this if his program is not GPL.

Thaks for your comment. I am using this for only myself and it is not a commerical program.

anda_skoa
18th November 2016, 09:32
However, Qt Open Source is LGPL, so a program linked to statically to Qt cannot legally be sold as a commercial product.

The LGPL has no requirement that would prohibit selling software that is LGPL licensed itself, let alone something linking with an LGPL licensed library.

Cheers,
_