Important: Please read the Qt Code of Conduct -

SMTP Client

  • Has been a while since i worked with QT. A couple of years ago I used the bluetiger9/SmtpClient-for-Qt and worked pretty good as i recall. I have a new desktop computer so i lost the old QT and the configuration. I have a brand new install of QT.
    I created a new project (test1) and compile it and runs, i get the empty window. In the project folder i created a folder smtp and put the contents of the scr folder from the download in there. I added a folder to the project by right click on the project and selecting add. I added the network keyword to the .pro QT directive (so i have core gui network).
    The first error that i get is "multiple definition of qmain" but i don't get how can it be picked up again by the compilor.
    Thanks for the help.

  • I solve the multiple references, for some reason when i added the folder the main.cpp and the mainwindow.cpp where duplicated in the .pro file. I still have more than 120 error. Most of them point to undefined references in the moc files.

  • Lifetime Qt Champion

    And you did delete any old build folder that might be around ?

  • I solved the problem maybe in a troglodyte way. On the definition of every class right after the word class was a macro called SMTP_EXPORT which in term called a QT macro either Q_DECL_EXPORT or Q_DECL_IMPORT i'm guessing depending if you are building the library or using it once built.
    I didn't know how to use this as a library, so my solution was to delete SMTP_EXPORT from each class and compile all the classes as part of the program.
    I don't know what implication that may have, but the program works nicely.

  • Lifetime Qt Champion

    Might not have any implications unless you plans to use it as a shared library.

Log in to reply