Results 1 to 3 of 3

Thread: Error on DLL attached to project

  1. #1
    Join Date
    Sep 2015
    Posts
    22
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Post Error on DLL attached to project

    i ve just created a project in QT 5.5.1 with Mingw and add the compiled version of SMTP client made by blutiger9 https://github.com/bluetiger9/SmtpClient-for-Qt

    the implementation works like a charm in Mingw but i want to compiled with Visual Studio, so i made a DLL version of SMTP client compiled w/ visual 2013 32, no problems there, but then i added to my project, and try to compile it w/ visual studio 2013 32 bit all together but this message pups up :

    SMTPEmail.dll:-1: error: LNK1107: invalid or corrupt file: cannot read at 0x2C8

    i believe im missing some preprocesor directives to compile SMTP under visual but i dont know what to add or where to look...any help will be very appreciated

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,489
    Thanks
    252
    Thanked 716 Times in 706 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Error on DLL attached to project

    Why are you trying to link to a DLL? You link to the .LIB counterpart of the DLL at link time.

    Everything has to be built and linked with the same compiler: Qt, the SMTP library, your app, and anything else you use. It all has to be 32-bit or 64-bit. It all has to be DEBUG or RELEASE mode. You can't mix and match anything.

  3. The following user says thank you to d_stranz for this useful post:

    danalex07 (30th January 2016)

  4. #3
    Join Date
    Sep 2015
    Posts
    22
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Error on DLL attached to project

    thx men i've just added .lib file instead of .dll and it works like a charm.....

Similar Threads

  1. how can be known a curve is attached?
    By Alex22 in forum Qwt
    Replies: 3
    Last Post: 9th July 2016, 12:23
  2. How to get printer name attached through LPT Port?
    By gurmeetsingh in forum Qt Programming
    Replies: 0
    Last Post: 20th April 2012, 14:18
  3. Replies: 4
    Last Post: 7th December 2011, 09:20
  4. getting attached curve to a plot
    By corrado1972 in forum Qwt
    Replies: 2
    Last Post: 22nd June 2011, 09:35
  5. Project Error
    By assismvla in forum Installation and Deployment
    Replies: 6
    Last Post: 18th June 2008, 19:48

Tags for this Thread

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.