Compilation failing Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3787
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Compilation failing

Post by ONEEYEMAN » Fri Jan 10, 2020 2:56 am

Hi, ALL,
I am trying to compile the following code:

Code: Select all

#ifdef __WXGTK__
#if !GTK_CHECK_VERSION(3,6,0)
#include "wx/generic/stattextg.h"
#endif
#include "gtk/gtk.h"
#include "wx/nativewin.h"
#endif
What I'm getting is:
error: missing binary operator before token "('
#if !GTK_CHECK_VERSION(3,6,0)
^
Trying to compile with gcc-5.4 in c++11 mode.

I think I just need a fresh pair of eyes, because I can't spot what am I doing wrong...

I need to change the background colour for static text and it works starting from GTK+3.6.0...


Thank you.

DavidHart
Site Admin
Site Admin
Posts: 3925
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compilation failing

Post by DavidHart » Fri Jan 10, 2020 10:07 am

Hi,

It's a GTK+ macro, not a wx one, so you need to precede it with e.g.:
#include "gtk/gtk.h"

Regards,

David

Post Reply