Reputation: 33813
Is it possible to setup the wxWidgets
library in Qt Creator? And what are the steps to do that? I know the steps in Visual Studio, but Qt creator no, because it is no easy.
I have tried to write the following in .pro
file.
INCLUDEPATH += "C:/wxWidgets302/include"
INCLUDEPATH += "C:/wxWidgets302/lib/gcc_lib/mswu"
LIBS += -L"C:/wxWidgets302/lib/gcc_lib" -lwxbase30u -lwxmsw30u_core -lwxpng -lwxzlib -lwxregexu -lwxexpat
but still does not linked, and the following errors appeared.
undefined reference to IID_IShellLinkW
undefined reference to _imp__CoCreateInstance@20
undefined reference to IID_IPersistFile
undefined reference to _imp__OleUninitialize@0
undefined reference to _imp__OleUninitialize@0
C:/wxWidgets302/lib/gcc_lib\libwxbase30u.a(baselib_filename.o): bad
reloc address 0xa in section
.text$_ZN8wxString4LastEv[__ZN8wxString4LastEv]
error: ld returned 1 exit status
I'm using qtcreator v3.1.2
+ mingw v4.8.2 32Bit
+ wxWidgets v3.0.2
.
Upvotes: 0
Views: 2290
Reputation: 21
Using the following code in your pro file:
wxCXXFLAGS = $$system(wx-config --cxxflags --unicode=yes --debug=no)
wxLinkOptions = $$system(wx-config --debug=no --libs --unicode=yes)
LIBS += $$wxLinkOptions
QMAKE_CXXFLAGS_RELEASE += $$wxCXXFLAGS
QMAKE_CXXFLAGS_DEBUG += $$wxCXXFLAGS
Upvotes: 1