Author Topic: Linking directly with GTK/X11  (Read 3563 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Linking directly with GTK/X11
« on: June 05, 2010, 11:52:12 am »
Normally linking with wxWidgets should be enough, even for wxGTK.

But if you have to use functions that aren't available in the API,
then use $(WX_GTK2_LIBS) and $(WX_X11_LIBS)* rather than
`pkg-config gtk+-2.0 --libs` and -lX11 directly, since otherwise
it will break on other wxWidgets platforms (wxMSW and wxMac).

* Where variable "X11_LIBS" is like a shorthand for "$X_LIBS -lX11".

It's not enough to check for GTK2/X presence, since they might be
there but not used - like when compiling on Mac OS X (it has X11).
So the variables prefixed with WX_ are used like "when on wxGTK",
on other wxWidgets platform they will be empty even with GTK2/X.