Search code examples
c++gccconfigurationwxwidgetsrhel

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


I am new to Linux environment, we have task to migrate a Windows wxWidgets(version 2.4.2) GUI application to Linux platform(RHEL8 or 8.3).The application is successful on Visual studio 2017&2019(Compiler MSVC++ 14.1 and 14.2) using the wxWindows-2.4.2(very old one). But when i try to build wxWindows2.4.2 on Linux( g++ (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5))

../configure --with-gtk=2

at configuration stage process stopped saying

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

I tried by installing "Development Tool" on Linux but getting same thing.

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


Solution

  • You can successfully run the configure phase by first performing dnf install gtk2-devel, and then configuring with ./configure --enable-gtk2.

    However, (not surprisingly), wx 2.4.2 will not successfully build on RHEL8 (I tried); there will be a bunch of compilation errors. Those are not impossible to fix, but I wonder if that's worth the trouble – there probably would be runtime errors and/or misbehaving GUI components at the next stage.

    While I understand your strategy of choosing the old wx version that the application is known to work with on Windows, it seems to be the hard way in this case.