You will notice that these errors come from the .c file not the .vala
file.  When you are calling a library from a C program you must also
have the .h headers installed.   In practice this usually means
installing a package such as libNAME-dev

If you are using Ubuntu/Debian try

sudo apt-get install libfcgi-dev


Hope this helps, I am also a noob, but this happens to me a lot

On 11 March 2010 22:11, Jeff Cave <[email protected]> wrote:
> 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"
>
> <snip: bunch of warnings>
>
> fcgiserv.vala.c:12:20: error: server.h: No such file or directory
> fcgiserv.vala.c:13:18: error: init.h: No such file or directory
> fcgiserv.vala.c:16:21: error: request.h: No such file or directory
> fcgiserv.vala.c:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘*’ token
> fcgiserv.vala.c:55: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘*’ token
> fcgiserv.vala.c:67: error: expected ‘)’ before ‘*’ token
> fcgiserv.vala.c:68: error: expected ‘)’ before ‘*’ token
> fcgiserv.vala:30: error: expected ‘)’ before ‘*’ token
> fcgiserv.vala.c: In function ‘program_main’:
> fcgiserv.vala.c:88: error: ‘FastCGIServer’ undeclared (first use in this
> function)
> fcgiserv.vala.c:88: error: (Each undeclared identifier is reported only once
> fcgiserv.vala.c:88: error: for each function it appears in.)
> fcgiserv.vala.c:88: error: ‘_tmp0_’ undeclared (first use in this function)
> fcgiserv.vala.c:89: error: ‘_tmp1_’ undeclared (first use in this function)
> fcgiserv.vala.c:90: error: ‘FastCGIServerRequestHandlerFunc’ undeclared (first
> use in this function)
> fcgiserv.vala.c:90: error: expected ‘;’ before ‘_tmp2_’
> fcgiserv.vala:17: error: ‘program_s_server’ undeclared (first use in this
> function)
> fcgiserv.vala:18: error: ‘_tmp2_’ undeclared (first use in this function)
> fcgiserv.vala:18: error:
> ‘_program_request_handler_fast_cgi_server_request_handler_func’ undeclared
> (first use in this function)
> fcgiserv.vala: At top level:
> fcgiserv.vala:30: error: expected ‘)’ before ‘*’ token
> error: cc exited with status 256
> Compilation failed: 1 error(s), 16 warning(s)
> ________________________________________________
>
> 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.
>
> Possibly relevant: using version 0.7.10 from MonoDevelop. I've cut a bunch of
> the warnings out, they are mostly regarding deprecated syntax.
>
>
> Jeff Cave
> 403.835.0845
> [email protected]
> _______________________________________________
> Vala-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to