Web lists-archives.com

RE: Is a Module Definition File needed when building with MSVC (gtk-2-24)?




Hi John,

 

Can you try generating gtk/gtkmarshalers.[c|h] using glib-genmarshal?  Can you also test using the Python version of glib-genmarshal and see whether the linking z   works properly?  If not, use the former .exe version of the tool, and perhaps file a bug against the Python version of glib-genmarshal?

 

(In the gtk\ subdir)

   $(glib-genmarshal command) --prefix=_gtk_marshal ./gtkmarshalers.list --header > gtkmarshalers.h

 

echo #include "gtkmarshalers.h" > gtkmarshalers.c

echo #include "gtkalias.h" >> gtkmarshalers.c

$(glib-genmarshal command) --prefix=_gtk_marshal ./gtkmarshalers.list --body >> gtkmarshalers.c

 

With blessings, thank you!

 

Windows 10 手機傳送

 

寄件者: John Emmas
傳送時間: 2018122 00:06
收件者: gtk-devel-list
主旨: Is a Module Definition File needed when building with MSVC (gtk-2-24)?

 

Perhaps wrongly I've been using a module definition file when building gtk-2-24 with MSVC (I'm saying "perhaps" because it used to be needed at one time but maybe that eventually got superseded and I didn't notice...)

On 8th Jan, the following symbols got added to 'gtk/gtk.symbols' by commit #331877fe36 (Fix abicheck):-

      gtk_marshal_VOID__BOOLEAN
      gtk_marshal_VOID__BOXED
      gtk_marshal_VOID__ENUM
      gtk_marshal_VOID__INT
      gtk_marshal_VOID__OBJECT
      gtk_marshal_VOID__POINTER
      gtk_marshal_VOID__STRING
      gtk_marshal_VOID__UINT
      gtk_marshal_VOID__VOID

Like I said, I'd always assumed that 'gtk.symbols' was needed for generating a module definition file ('gtk.def') as that's generally what a symbols file gets used for (with MSVC).

If the module definition file isn't needed any more, just ignore this (gtk-2-24 seems to link okay without it).  But if it is still used, MSVC now produces the following linker errors:-

    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__BOOLEAN
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__BOXED
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__ENUM
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__INT
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__OBJECT
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__POINTER
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__STRING
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__UINT
    gtk.def : error LNK2001: unresolved external symbol gtk_marshal_VOID__VOID

Taking 'gtk_marshal_VOID__ENUM' as an example, 'gtk/gtkmarshalers.c' contains some variants - e.g.

    gtk_marshal_VOID__ENUM_BOOLEAN
    gtk_marshal_VOID__ENUM_ENUM
    gtk_marshal_VOID__ENUM_FLOAT
    gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN

along with a few others- but I can't find one that's just called 'gtk_marshal_VOID__ENUM' (hence the linker error if it it gets included in gtk.symbols).

Hope this all makes sense...

John

 

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list