cutelyst / simple-mail

An SMTP library written in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiling with 6.5 failed

volkerSchule opened this issue · comments

commented

Hallo,

i am currently converting my software project from Qt 5.15 to Qt 6.5.
I already used simple-mail in my software project with Qt 5.15 and it works fine! I love it !

But sadly compiling with Qt 6.5 failed (Windows gcc. With Linux it is fine). Of course i downloaded also the latest source, but sadly failed...

I am also confused, since it look like "simple-mail" and "SmtpClient-for-Qt" are both contributed by Attila Tőkés.
Both Projects look like there are active. I also tried "SmtpClient-for-Qt". That compiles fine with Qt 6.5 and i compiled the libraries without problems, but the api is slightly different and i am struggling converting file attachments. Also "SmtpClient-for-Qt" use the "old" qmake, while "Simple-Mail" use the "new" cmake. So i am totally confused what to do now.

Is there a new trick to compile? The last time (some years ago with Qt 5.15) i only opend the CMakeList with Qt Creator and only pressed compile and got the dll files. Now i get only a lot of errors (Windows). But Linux still work fine.

Thank you very much for this great project!

Under Windows i can see a lot of warnings like this:
C:\Users\Volker\Desktop\simple-mail-master\src\mimecontentformatter.cpp:23: Warnung: 'SimpleMail::MimeContentFormatter::MimeContentFormatter(int)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
C:/Users/Volker/Desktop/simple-mail-master/src/mimecontentformatter.cpp:23:1: warning: 'SimpleMail::MimeContentFormatter::MimeContentFormatter(int)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
23 | MimeContentFormatter::MimeContentFormatter(int max_length) :
| ^~~~~~~~~~~~~~~~~~~~

And a lot of Errors like this:
👎 Fehler: src/CMakeFiles/SimpleMail2Qt6.dir/emailaddress.cpp.obj:emailaddress.c:(.text+0x9): undefined reference to `__imp__ZTVN10SimpleMail12EmailAddressE'

should be fixed now

commented

Perfekt! Very fast fix and it is working fine now with windows gcc.
Thank you.