wxWindows 2.4.2 configuration failed saying checking for toolkit... configure: error: Please specify at most one toolkit

wxWindows 2.4.2 configuration failed saying checking for toolkit... configure: error: Please specify at most one toolkit

我是 Linux 环境的新手,我们的任务是将 Windows wxWidgets(版本 2.4.2)GUI 应用程序迁移到 Linux 平台(RHEL8 或 8.3)。使用 wxWindows-2.4.2(非常旧的)在 Visual studio 2017&2019(编译器 MSVC++ 14.1 和 14.2)上应用成功。但是当我尝试在 Linux( g++ (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)) 上构建 wxWindows2.4.2 时

../configure --with-gtk=2

在配置阶段进程停止说

checking for toolkit... configure: error: Please specify at most one toolkit (maybe some are cached in configarg.cache?)

我尝试在 Linux 上安装 “开发工具”,但结果相同。

来源:https://github.com/wxWidgets/wxWidgets/archive/refs/tags/v2.4.2.zip

您可以成功 运行 配置阶段,首先执行 dnf install gtk2-devel,然后使用 ./configure --enable-gtk2 配置。

但是,(不足为奇),wx 2.4.2 将无法在 RHEL8 上成功构建(我试过了);会有一堆编译错误。这些并非不可能修复,但我想知道这是否值得麻烦 - 在下一阶段可能会出现 运行time 错误 and/or GUI 组件行为不当。

虽然我理解您选择已知应用程序在 Windows 上使用的旧 wx 版本的策略,但在这种情况下这似乎是困难的方法。