Hi, I'm having trouble with the module example from http://live.gnome.org/Vala/TypeModules. I'm using MinGW (GCC 4.4.0) on Windows (XP with SP3) with the recent (0.7.10) Vala compiler from http://code.google.com/p/valide/downloads/list.
Here's what I do: /****************************************************/ C:\vtest>valac --pkg gmodule-2.0 main.vala plugin-interface.vala -o main C:\vtest>valac -C plugin.vala plugin-interface.vala C:\vtest>gcc -shared -fPIC -mms-bitfields -I/vala-0.7.10/include/glib-2.0 -I/val a-0.7.10/lib/glib-2.0/include plugin.c plugin-interface.c -L/vala-0.7.10/lib -lg object-2.0 -o libplugin.dll C:\vtest>main Loading plugin with path: 'libplugin.dll' Loaded module: 'libplugin.dll' (main.exe:3572): GLib-GObject-WARNING **: cannot register existing type `TestPlu gin' (main.exe:3572): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: as sertion `G_TYPE_IS_INTERFACE (interface_type)' failed (main.exe:3572): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertio n `g_type_parent (interface_type) == G_TYPE_INTERFACE' failed Plugin type: MyPlugin C:\vtest> /****************************************************/ If I compile with the "-g" flag I get the following from my JIT Debugger: /****************************************************/ main.exe caused an Access Violation at location 00401cc0 in module main.exe Reading from location 00000008. Registers: eax=00000000 ebx=7ffd7000 ecx=003e7028 edx=00000000 esi=00000000 edi=00000010 eip=00401cc0 esp=0022ff00 ebp=0022ff18 iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246 Call stack: 00401CC0 main.exe:00401CC0 test_plugin_hello plugin-interface.vala:2 ... public interface TestPlugin : Object { > public abstract void hello (); } ... 00401C54 main.exe:00401C54 _main main.vala.c:285 00401C9B main.exe:00401C9B main main.vala:39 ... } > void main () { var registrar = new PluginRegistrar<TestPlugin> ("plugin"); registrar.load (); ... 004010B6 main.exe:004010B6 00401148 main.exe:00401148 7C817077 kernel32.dll:7C817077 RegisterWaitForInputIdle /****************************************************/ I never used GLib or GObject before so I have no clues what the GLib warnings actually mean and what exactly is wrong. -- GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.! http://portal.gmx.net/de/go/dsl02 _______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list