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

Adding to Qt project throws "unresolved external symbol" errors

Sv443 opened this issue · comments

I am currently trying to add this library to my Qt project but I have never done this before.
I've looked through the Qt documentation on adding external libraries and have found and tried some ways to add the library, but they all failed.

I've tried:

  • adding the path to the src folder to my project's .pro file like this: INCLUDEPATH += "../Simple-Mail/src"
  • creating a .pri file in the Simple-Mail folder, adding INCLUDEPATH += ./src to it and using !include( ../Simple-Mail/SimpleMail.pri ) {} to include it in my main .pro file
  • using a raw path to access the headers (#include "../Simple-Mail/src/SmtpMime")

Every time the syntax highlighting, code suggestions and linter didn't give me any errors but upon building my project I get about 20 "unresolved external symbol" errors.
What am I doing wrong?

Same here

You should tell qmake to find it via pkgconfig or use CMake on your project.

Could you provide an example of how to do this? Right now I am trying to add it via a .pri file but having no luck. I was able to get https://github.com/bluetiger9/SmtpClient-for-Qt working but was having issues with failing the login authentication (reponse code 535) 😕 so here I am seeing if this will work instead.

You should tell qmake to find it via pkgconfig or use CMake on your project.

I couldn't find any information on how to do this that worked. Like @dakejahl said, maybe you could provide an example?

PKGCONFIG += simplemail2-qt5