[Vala] Vala API causing double definition
- From: Victor Aurélio Santos <victoraur santos gmail com>
- To: vala-list gnome org
- Subject: [Vala] Vala API causing double definition
- Date: Thu, 8 Oct 2015 20:29:06 -0300
Hi, consider the following Vala API file:
namespace CAjami {
[CCode (cprefix = "io_", cheader_filename = "io.h")]
namespace IO {
[CCode (cname = "io_init")]
public void init();
[CCode (cname = "io_cleanup")]
public void cleanup();
}
}
there's something wrong with that ?, every time I use
CAjami.IO.cleanup(); inside a member the class get duplicated
definition, if i just comment out the line with cleanup(); function it
compiles normal.
the vala code:
public override void shutdown() {
base.shutdown();
CAjami.IO.cleanup();
}
and the error:
build/src/ajamiapp.c:66:8: error: redefinition of '_AjamiAjami'
struct _AjamiAjami {
build/src/ajamiobjects.h:111:8: note: previous definition is here
struct _AjamiAjami {
build/src/ajamiapp.c:71:8: error: redefinition of '_AjamiAjamiClass'
struct _AjamiAjamiClass {
build/src/ajamiobjects.h:116:8: note: previous definition is here
struct _AjamiAjamiClass {
if I just comment out the call the function in the shutdown() signal
is build normal.
Thanks.
--
Victor Aurélio Santos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]