Re: [Vala] Generated vapi file for a library not compilable.
- From: PCMan <pcman tw gmail com>
- To: Axel FILMORE <axel filmore gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Generated vapi file for a library not compilable.
- Date: Thu, 29 Nov 2012 13:09:53 +0800
Thanks for sharing.
Manually editing the vapi file works for me too, but this is only a
workaround.
After regeneration of vapi files, the changes are gone and need to be done
again.
There must be something wrong in valac or my compiler settings.
We need a way to generate correct vapi files from vala code directly.
So, it seems that it's a bug in valac?
On Thu, Nov 29, 2012 at 12:07 PM, Axel FILMORE <axel filmore gmail com>wrote:
On Thu, 29 Nov 2012 10:13:40 +0800
PCMan <pcman tw gmail com> wrote:
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.
I had a similar problem doing this :
namespace Panel {
public class MenuApplet {
}
}
public static AppletType register () {
applet_type.id = typeof (MenuApplet); // < it's "PanelMenuApplet"
return applet_type;
}
I found that the type *is not* "MenuApplet" but "PanelMenuApplet",
I just removed the namespaces for Panel Applet that fixed the problem :
public class MenuApplet {
}
public static AppletType register () {
applet_type.id = typeof (MenuApplet);
return applet_type;
}
:)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]