1

I am new in the world of Qt. I would like to add an external library of wxMSW-2.8.12 in Qt Creator. In order to do that, I right-clicked on my .pro file and clicked on "Add Library", then I select "External Library". I finally choose the Library file, click on "Static" for "Linkage".

This is what I got automatically from Qt Creator:

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/ -lwxbase28ud_xml    
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/ -lwxbase28ud_xmld 
else:unix: LIBS += -L$$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/ -lwxbase28ud_xml

INCLUDEPATH += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib DEPENDPATH += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib

win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/libwxbase28ud_xml.a 
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/libwxbase28ud_xmld.a 
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/wxbase28ud_xml.lib    
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/wxbase28ud_xmld.lib
else:unix: PRE_TARGETDEPS += $$PWD/../../../../../../wxMSW-2.8.12/lib/vc_lib/libwxbase28ud_xml.a

But, when running, I get this error:

:-1: erreur : No rule to make target 'C:/Qt/Qt5.2.0/Tools/QtCreator/bin/testConverter/../../../../../../wxMSW-2.8.12/lib/vc_lib/libwxbase28ud_xmld.a', needed by 'debug\testConverter.exe'.  Stop.

I tried to clean and rerun qmake but with any success.

Any suggestions?

Colet
  • 495
  • 2
  • 8
  • 22
  • 1
    What compiler are you using? The lib you're trying to add was compiled with Visual Studio. – Adri C.S. Feb 25 '14 at 17:33
  • I am compiling with MinGW and the lib was compiled with VS yes. I would like to use VS, how should I change the compiler in Qt? – Colet Feb 26 '14 at 08:49
  • You will need to have `Qt` compiled with VS. Is it? – Adri C.S. Feb 26 '14 at 09:01
  • In my Tools > Options... > Compile and Run, I there are detected MinGW and Microsoft Visual C++ Compiler 9.0. I I have a screenshot of it but I can't put it here... – Colet Feb 26 '14 at 09:19
  • Screenshot of my Compile & Run: can you see it? http://i.stack.imgur.com/KXcuP.png – Colet Feb 26 '14 at 09:24
  • 1
    Mm, I had the same problem as you with the `Compiler and Run`. In my case, I had `Qt` built with MinGW. So even Visual Studio was detected, I couldn't use it. I had to built `Qt` again from source with Visual Studio in order to be able to use it with Qt Creator. – Adri C.S. Feb 26 '14 at 11:14
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/48481/discussion-between-colet-and-adri-c-s) – Colet Feb 26 '14 at 13:08
  • Ok, I havenow installed this qt-opensource-windows-x86-msvc2010_opengl-5.2.1. I have another question: I have an application that was compiled with VS 2008, do you think that it could run with VS 2010 compiler as well? – Colet Feb 26 '14 at 13:25

0 Answers0