Re: [Vala] Newbie Compile Time Errors



Hi,

2010/3/11, Jeff Cave <jefferey cave gmail com>:
I've decided to start tinkering with Vala  (come from MS C# background),
 having most of my interest in web development I've decided to start with
 libvfcgi. I've managed to compile libvfcgi, but can't seem to get my
 application (just the supplied example at this time) to link to the library
 (correctly at least).
 ________________________________________________

 valac -d './bin/' -g  --vapidir "."  --pkg "glib-2.0"  --pkg "gio-2.0"
 "./libvfcgi.vapi"  "./ValaFCGI/fcgiserv.vala"  -o "ValaFCGI"
You'll need to get C compiler flags for the library as well (the vapi
isn't enough).
The easiest way, if you've already installed the library, is to pass
"--pkg libvfcgi" to valac. (you may need to add the directory where
the libvfcgi.pc is installed to the PKG_CONFIG_PATH environment
variable).

 All of these header files would be coming from the VAPI, and I don't quite get
 where the error is occuring: compilation of the library, the way I'm linking
 the library, or the compilation of fcgiserv.
The problem is in the compilation of fcgiserv : if passing the vapi
alone to the compiler, you'll need to pass the C compiler flags, using
the -X option or by compiling to C then compiling with the C compiler.
Anyway, I think it's better to install the library.

HTH,
Abderrahim

disclaimer: I've never tried this particular library, there may be
some quirks, but this is the general approach for vala.



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