Which compiler option I should choose?

Posted by Surjya Narayana Padhi on Stack Overflow See other posts from Stack Overflow or by Surjya Narayana Padhi
Published on 2011-01-07T07:04:24Z Indexed on 2011/01/09 2:54 UTC
Read the original article Hit count: 201

Hi Geeks,

I have to use the third party static library for my qt application to run on windows. The third party provides me a .lib and .h file for use. These libraries are compiled with MSVC compiler.

My qt Creator is using MinGW compiler to compile my application. I copied the .h and .lib file to my qt project directory and then added those in .pro file as follows

QT += core gui

TARGET = MyTest TEMPLATE = app

LIBS += C:\Qt\2010.05\qt\MyTest\newApi.lib

SOURCES += main.cpp\ mainwindow.cpp

HEADERS += mainwindow.h \ newApi.h

FORMS += mainwindow.ui

Now I am getting some runtime error like this -

Starting C:\Qt\2010.05\qt\MyTest-build-desktop\debug\MyTest.exe... C:\Qt\2010.05\qt\MyTest-build-desktop\debug\MyTest.exe exited with code -1073741515

Can any body suggest is this runtime error is due to mismatch of compiler? (because of my .lib file I added is comipled in MSVC compiler and my qt app is compiled using MinGW compiler)

If not what may be the reason? Am I missing anything in adding the .h and .lib file to my qt project?

If my MinGW compiler will not support the .lib file generated in MSVC compiler what may be the work-arround?

Can I create the .lib files in MinGW compiler? or this format is supported only by MSVC compiler only?

Please suggest...

© Stack Overflow or respective owner

Related posts about visual-c++

Related posts about qt4