[英]How can Qt Creator be used as general C++ IDE (no usage of Qt library)?
[英]Is it possible to setup the wxWidgets library in Qt creator IDE?
是否可以在Qt Creator中設置wxWidgets
庫? 並采取哪些步驟呢? 我知道Visual Studio中的步驟,但是Qt創建者不知道,因為這並不容易。
我試圖在.pro
文件中寫入以下內容。
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
但仍未鏈接,並且出現以下錯誤。
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
我正在使用qtcreator v3.1.2
+ mingw v4.8.2 32Bit
+ wxWidgets v3.0.2
。
在您的pro文件中使用以下代碼:
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.