Hello, I got another issue with vala. I moved the core part of my program to a separate library, and let the main program call that library. The library itself compiles correctly. However, the genrated vapi file is not usable by the main program. Both parts are written in vala. The generated vapi file looks like this.
When compiling the main program with --pkg <my_vapi_file>, I got errors. The generated vapi file seems to have duplicated nested namespace for static methods like this. namespace Lxpanel { class Applet : Object { static Lxpanel.Applet? from_file(string...); } } If I remove Lxpanel.Applet manually and just use Applet, it works. I like vala a lot and want to continue use it for my project, so I hope that someone knows how to fix it. Otherwise I may have to rewrite the program in plain C/GObject, which is a pain. :-( All of the errors I got are like these: VALAC lxpanel2_vala.stamp lxpanel-applet.vapi:10.27-10.49: error: The type name `Lxpanel.AppletInfo' could not be found public static GLib.List<weak Lxpanel.AppletInfo> get_all_types (); ^^^^^^^^^^^^^^^^^^^^^^^ lxpanel-applet.vapi:13.10-13.35: error: The type name `Lxpanel.AppletInfo' could not be found public unowned Lxpanel.AppletInfo get_info (); ^^^^^^^^^^^^^^^^^^^^^^^^^^ lxpanel-applet.vapi:18.17-18.30: error: The type name `Lxpanel.Applet' could not be found public static Lxpanel.Applet? new_from_type_name (string type_name); ^^^^^^^^^^^^^^ lxpanel-applet.vapi:19.44-19.61: error: The type name `Lxpanel.AppletInfo' could not be found public static void register_applet_info (Lxpanel.AppletInfo info); ^^^^^^^^^^^^^^^^^^ lxpanel-applet.vapi:34.10-34.29: error: The type name `Lxpanel.AppletModule' could not be found public Lxpanel.AppletModule? module; ^^^^^^^^^^^^^^^^^^^^ lxpanel-applet.vapi:40.10-40.23: error: The type name `Lxpanel.Applet' could not be found public Lxpanel.Applet? create_new (); ^^^^^^^^^^^^^^ lxpanel-applet.vapi:41.17-41.34: error: The type name `Lxpanel.AppletInfo' could not be found public static Lxpanel.AppletInfo? from_file (string applet_id, string info_path); ^^^^^^^^^^^^^^^^^^ lxpanel-applet.vapi:74.24-74.37: error: The type name `Lxpanel.Button' could not be found public class Drawer : Lxpanel.Button { ^^^^^^^^^^^^^^ lxpanel-applet.vapi:75.13-75.25: error: The type name `Lxpanel.Popup' could not be found protected Lxpanel.Popup? popup; ^^^^^^^^^^^^^ lxpanel-applet.vapi:80.28-80.41: error: The type name `Lxpanel.Button' could not be found public class MenuButton : Lxpanel.Button { ^^^^^^^^^^^^^^ Compilation failed: 10 error(s), 0 warning(s) Thank you guys!
_______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list