// Point.vala
namespace Test {
class Point {
public const int MY_CONST = 123;
public float x { get; set; }
public float y { get; set; }
}
}
There is a vala source file, 'Point.vala'
- --vapi
valac --vapi=Point.vapi --library=point -X -shared Point.vala
:
// Point.vapi
namespace Test {
}
empty...
- --internal-vapi
valac --internal-vapi=Point.vapi --header=Point.h --internal-header=Point_internal.h --library=point -X -shared Point.vala
:
// Point.vapi
namespace Test {
[CCode (cheader_filename = "Point_internal.h")]
internal class Point {
public const int MY_CONST;
public Point ();
public float x { get; set; }
public float y { get; set; }
}
}
it seems perfect and works for me
- --fast-vapi
valac --fast-vapi=Point.vapi --library=point -X -shared Point.vala
:
// Point.vapi
using GLib;
namespace Test {
internal class Point {
public const int MY_CONST = 123; // error
public Point ();
public float x { get; set; }
public float y { get; set; }
}
}
this raises an error, error: External constants cannot use values
, when using this vapi
Q1: What is exact difference? and why are there the options.
Q2: For creating shared lib, Should I use --internal-vapi?