wxWidgets 3.2 `Makefile` adaptions.
Brought to you by:
msw012
wxWidgets 3.2 is out, and on my system (Artix/ Arch Linux) it is now the default.
Without modifications, your project fails to build with wxWidgets 3.2:
In file included from Config.hpp:23,
from Config.cpp:17:
TypeDefs.hpp:30:10: fatal error: wx/wx.h: No such file or directory
30 | #include <wx/wx.h>
| ^~~~~~~~~
For me, the following changes to src/Makefile did make the package build (note that I automatically retrieve the wxWidgets version in a way that only works on Arch based distributions; you should find a generic way):
# Specify the version of the wxWidgets library to compile against
-GSPICEUI_WXLIB = 3.0
+GSPICEUI_WXLIB = $(pacman -Q wxgtk2 | awk '{print $2}' | awk -F. '{print $1"."$2}')
@@ -52,5 +52,5 @@
# Indentify the wxWidgets configuration utility to use :
-# (for GTK3 -> wx-config-gtk3 or for GTK2 -> wx-config)
-# wxgtk2 --> /usr/bin/wx-config --> wxWidgets 3.0.4 built on GTK2 --> broken (relocation error)
-# wxgtk3 --> /usr/bin/wx-config-gtk3 --> wxWidgets 3.0.4 built on GTK3 --> broken (relocation error)
+# (for GTK3 -> wx-config or for GTK2 -> wx-config-gtk2)
+# wxgtk2 --> /usr/bin/wx-config-gtk2 --> wxWidgets 3.2.0 built on GTK2
+# wxgtk3 --> /usr/bin/wx-config --> wxWidgets 3.2.0 built on GTK3
# wxgtk2.8 --> /usr/bin/wx-config-2.8 --> wxWidgets 2.8.12 built on GTK2 --> works with warnings and only if debugging is switched on
@@ -58,6 +58,6 @@
ifeq ($(GSPICEUI_DEBUG),0)
- WXCFG = /usr/bin/wx-config
+ WXCFG = /usr/bin/wx-config-gtk2
# WXCFG = /usr/local/bin/wx-config
else
- WXCFG = /usr/bin/wx-config
+ WXCFG = /usr/bin/wx-config-gtk2
# WXCFG = /usr/local/bin/wx-config
Also note that former wx-config-gtk3 is now wx-config, and former wx-config is now wx-config-gtk2.
Regards!
Instead of
wx-config-gtk2andwx-config, alsowx-config --toolkit=gtk2andwx-config --toolkit=gtk3could be used. That seems to be more future-proof and independent on how distributions name the binaries.Some time has past but I have implemented you're idea about "wx-config --toolkit=".
As far as the build problems I'm uncertain about the current state of affairs. But here's some info. that might help. wxWidgets and GTK are moving targets so it's necessary to constantly adapt depending on changes to these toolkits. At present the recommended combination is wxWidgets v3.2.x (specifically v3.2.8.1) and GTK3. This combination is what I use for development so gSpiceUI will appear at it's best. There's no longer any realistic support for GTK2.
Thanks for the feedback.
What about a new release so that packages can update?
Latest release I find at https://sourceforge.net/projects/gspiceui/files/gSpiceUI/ is still 1.2.87.
Regards!