Re: c++ source generation from C code



On 2018-07-12 05:43, Pavlo Solntsev via gtkmm-list wrote:
Hi,

As I mentioned before, libgda was significantly modified and as
results, libgdamm is broken. I was trying to fix this. Overall, I was
very close to the final solution but it looks like the generated c++
code contains statement like:

using GdaHandlerBooleanClass = struct _GdaHandlerBooleanClass;

and it causes compilation error:
conflicting declaration...

previous declaration as ‘typedef struct GdaHandlerBinClass
GdaHandlerBinClass’
 G_DECLARE_FINAL_TYPE (GdaHandlerBin, gda_handler_bin, GDA,
HANDLER_BIN, GObject)
                       ^
/home/pavlo/jhbuild/install/include/glib-2.0/gobject/gtype.h:1399:54:
note: in definition of macro ‘G_DECLARE_FINAL_TYPE’
   typedef struct { ParentName##Class parent_class; }
ModuleObjName##Class;                               \
                                                      ^~~~~~~~~~~~~

Could you please give me a hint to the solution, if any? I suspect it
is a m4 macro issue, that should be modified. 

On other matter. Do you accept merge requests to gitlab?

Thanks.

Try _STRUCT_NOT_HIDDEN, like in e.g. https://gitlab.gnome.org/GNOME/gtkmm/blob/master/gtk/src/filechoosernative.hg line 109:

class FileChooserNative : public NativeDialog, public FileChooser
{
  _CLASS_GOBJECT(FileChooserNative, GtkFileChooserNative, GTK_FILE_CHOOSER_NATIVE, NativeDialog, GtkNativeDialog)
  _IMPLEMENTS_INTERFACE(FileChooser)
  _STRUCT_NOT_HIDDEN
  ......

Whether merge requests are accepted for libgdamm, I don't know. I have not worked with libgdamm.

/Kjell




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]