Results 1 to 5 of 5

Thread: Including library

  1. #1
    Join Date
    May 2016
    Posts
    8
    Thanks
    2

    Default Including library

    Hi

    I'm using Qt 5.6 on Windows

    I'm trying to send-email in my application and wanted to use this library

    But I happend to have some trouble including it in any program. I've checked related topics but it didn't help.

    I built the porject, and compiled it to get my .a. When I use the Qt tool (or do it myself) to include the library I get this error on compilation : "cannot find -lSMTPEmail".

    I'm still new to Qt, so this my just be some basic mistake I make somewhere, sorry if informations are missing

    Thanks for your help.
    Stank

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Including library

    Where did you put the .a file?

    If it is not in your project, did you add a -L directive in the LIBS variable to point to the other directory?

    Cheers,
    _

  3. #3
    Join Date
    May 2016
    Posts
    8
    Thanks
    2

    Default Re: Including library

    Hi,

    Thanks for your reply.

    Here is the code i've added in my .pro file (this one's been added automaticly by QtCreator)

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../SmtpClient-for-Qt/release/ -lSMTPEmail
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../SmtpClient-for-Qt/debug/ -lSMTPEmail
    else:unix: LIBS += -L$$PWD/../../SmtpClient-for-Qt/ -lSMTPEmail

    INCLUDEPATH += $$PWD/../../SmtpClient-for-Qt/release
    DEPENDPATH += $$PWD/../../SmtpClient-for-Qt/release

    Thanks,

    Stank

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Including library

    And the library is in one of these directories?

    Cheers,
    _

  5. #5
    Join Date
    May 2016
    Posts
    8
    Thanks
    2

    Default Re: Including library

    God damit I'm just a morron, I didn't configure the debug kit correctly, and since I only checked release, it messed up the reception folder in Debug mode.
    I can now try to fix code issues.
    Thanks for your time and opening my eyes

    Stank

Similar Threads

  1. Replies: 11
    Last Post: 27th May 2011, 23:15
  2. Including a static library
    By jepessen in forum Newbie
    Replies: 3
    Last Post: 6th May 2011, 10:35
  3. Replies: 2
    Last Post: 19th February 2011, 12:26
  4. Problem including library (dllimport)
    By cae in forum Qt Programming
    Replies: 9
    Last Post: 28th May 2010, 07:53
  5. including
    By mickey in forum General Programming
    Replies: 2
    Last Post: 26th July 2006, 22:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.