bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
456 stars 228 forks source link

If built with Qt 5, erroneously requires QtGui module #75

Closed Thra11 closed 2 years ago

Thra11 commented 5 years ago

By default, the QT qmake variable includes core and gui (See https://doc.qt.io/qt-5/qmake-variable-reference.html#qt).

This means that in its current state, SmtpClient-for-Qt cannot be built if the QtGui module isn't available (e.g. on minimal embedded systems without graphics). qmake gives the following error:

Project ERROR: Unknown module(s) in QT: gui

In order to build without the gui module, you need to add

QT -= gui

to the project file. I don't know whether the line needs to be conditional to maintain Qt4 compatibility.

Removing the gui module from the library should have no effect on GUI applications which use the library.