Re: [Vala] .vala's and .h's
- From: Alexander Kojevnikov <alexander kojevnikov com>
- To: vala-list gnome org
- Subject: Re: [Vala] .vala's and .h's
- Date: Wed, 4 Aug 2010 08:51:08 +1000
On 4 August 2010 05:59, Mikkel Kamstrup Erlandsen
<mikkel kamstrup gmail com> wrote:
On 24 July 2010 01:32, Borja Varela Brea <vishkey_vigo_7 hotmail com> wrote:
It is, I want to use a function that i have in c with vala directly. ¿Exists any form to do that? Thanks
You can hand craft a .vapi file for you C code and then compile you
Vala code with the extra --vapidir and --pkg flags required to hook
that .vapi in. I've done this a few times without any problems.
An example of how to do it:
http://gitorious.org/spek/spek/blobs/master/vapi/spek-audio.vapi#line28
http://gitorious.org/spek/spek/blobs/master/src/spek-audio.h#line56
http://gitorious.org/spek/spek/blobs/master/src/spek.vala#line56
http://gitorious.org/spek/spek/blobs/master/src/Makefile.am
You can start your project from this template if you are not using
autotools yet:
http://github.com/tadeboro/Sampala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]