Hi Tomasz, valac currently doesn't support this kind of c-style macros and as far as i know they're not planned to be supported ever. (the only documentation about the preprocessor i could find is in the vala-faq http://live.gnome.org/Vala/FAQ#Does_Vala_have_a_preprocessor.3F ) Probably you can make your data path customisable rather than fixed or you can use the Freedesktop standard for directory locations. http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html best regards Harry Am Donnerstag, den 07.10.2010, 12:40 +0200 schrieb Tomasz Jankowski:
Hello! I'm new to Vala. I already integrated it with my project (I use Autotools). I have problem with defining preprocessor symbol, I want to do something like this: gcc -DDATA_DIRECTORY_PATH="../data" main.c -o app where I use DATA_DIRECTORY_PATH somewhere in main.c as regular string. When I try to do something similar with valac it fails, her's make output: /usr/bin/valac --define=DATA_DIRECTORY_PATH="../data" --pkg=gtk+-2.0 -C main.vala main.vala:29.17-29.35: error: The name `DATA_DIRECTORY_PATH' does not exist in the context of `Main.main' string path = DATA_DIRECTORY_PATH; ^^^^^^^^^^^^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s) _______________________________________________ vala-list mailing list vala-list gnome org http://mail.gnome.org/mailman/listinfo/vala-list
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil