Last active
March 8, 2016 20:19
-
-
Save bboozzoo/a7d427a20e1d299d929e to your computer and use it in GitHub Desktop.
vala missing header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __BAR_H__ | |
#define __BAR_H__ | |
enum { | |
BAR_UP | |
}; | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __FOO_H__ | |
#define __FOO_H__ | |
enum { | |
FOO_UP | |
}; | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// valac -C foo.vala --vapidir . --pkg foo | |
public static void main() { | |
var f = Test.Foo.UP; | |
var b = Test.Bar.UP; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Test { | |
[CCode (cheader_filename = "foo.h", cname = "int", cprefix = "FOO_")] | |
public enum Foo { | |
UP | |
} | |
[CCode (cheader_filename = "bar.h", cname = "int", cprefix = "BAR_")] | |
public enum Bar { | |
UP | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* foo.c generated by valac 0.30.1, the Vala compiler | |
* generated from foo.vala, do not modify */ | |
#include <glib.h> | |
#include <glib-object.h> | |
#include <foo.h> | |
void _vala_main (void); | |
void _vala_main (void) { | |
int f = 0; | |
int b = 0; | |
f = FOO_UP; | |
b = BAR_UP; | |
} | |
int main (int argc, char ** argv) { | |
#if !GLIB_CHECK_VERSION (2,35,0) | |
g_type_init (); | |
#endif | |
_vala_main (); | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
include <bar.h> is missing from generated-foo.c