View Full Version : Error on DLL attached to project

29th January 2016, 02:15
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

29th January 2016, 16:36
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.

30th January 2016, 01:47
thx men i've just added .lib file instead of .dll and it works like a charm.....