是否可以在Qt创建器IDE中设置wxWidgets库

Is it possible to setup the wxWidgets library in Qt creator IDE?

本文关键字:IDE 设置 wxWidgets 创建 Qt 是否      更新时间:2023-10-16

是否可以在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_liblibwxbase30u.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