[Vala] Conditional compilation



Hello,

I'd like to do conditional compilation (use of #define, #ifdef, etc.) on my 
project just to do different things depending on the machine architecture and 
the presence of particular libraries in the system.

Some time ago, someone talked about that in the list or in the IRC, and the 
answer was to preprocess vala code with cpp by hand before using the vala 
compiler.

I've tried, but my cpp adds some odd lines at the beginning of the file. 
Example:

 # 1 "hello.vala"
 # 1 "<interno>"
 # 1 "<línea de orden>"
 # 1 "hello.vala"
 using GLib;

 public class Sample : Object {
 ...(remaining part of the code)...
 }

Has someone already done that?

Thanks in advance for your suggestions.

-- 
Enrique Ocaña González (eocanha igalia com)
Ingeniero en Informática
Igalia - http://www.igalia.com - 986107610 - Fax 981913949

Have a look at Happy Coding Blog... http://blogs.igalia.com/eocanha



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]