簡體   English   中英

是否可以在Qt創建者IDE中設置wxWidgets庫?

[英]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

但仍未鏈接,並且出現以下錯誤。

  1. undefined reference to IID_IShellLinkW
  2. undefined reference to _imp__CoCreateInstance@20
  3. undefined reference to IID_IPersistFile
  4. undefined reference to _imp__OleUninitialize@0
  5. undefined reference to _imp__OleUninitialize@0
  6. C:/wxWidgets302/lib/gcc_lib\\libwxbase30u.a(baselib_filename.o): bad reloc address 0xa in section .text$_ZN8wxString4LastEv[__ZN8wxString4LastEv]
  7. 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM