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
449 stars 226 forks source link

Error Import #148

Closed BL-Bl4ckBut7ch3r closed 11 months ago

BL-Bl4ckBut7ch3r commented 11 months ago

Hi!

I'm facing with an issues where I would use these source and header files but I receive import error upon compilation. (ex:undefined reference to `impZN11MimeMessageD1Ev')

I'm trying this on QT creator 4.11.1 and QT 5.14.2

I have the same setup on a raspberry Pi where on the QT (same versions) works just fine. Any ideas of why does this happen?

bluetiger9 commented 11 months ago

@BL-Bl4ckBut7ch3r, did you compiled the shared library and your application with the same Qt version and compiler?

bartaandras commented 11 months ago

I have the same issue when I try to use it as a static lib in windows. On linux it works fine but on windows it gives undefined references. I have Qt 6.2.3 MINGW-64. The SmtpEmail project builds fine and the static library (.a) is created. The issue happens when I try to link it to the rest of the project. It works fine even in windows if I build it as a dll.

Is it possible to use it as a static lib in windows?

bluetiger9 commented 11 months ago

@bartaandras, the library isn't really meant to be compiled as a static library. It may work, but you need to figure it yourself what goes wrong.