[Vala] C Integration, it's cool



I've found a goodie, i needed to use libcurl in a vala program, just to
fetch a file regulary from the internet,
after some searching i end up doing that:

i write all the curl thing in a c program , then i wrote a function that
makes the connection and return
the content of the file.
in vala i wrote

exter  char[] my-curl-fun-in-c();
and called that from vala where i needed

compile like that:
valac valasource.vala csource.c -X -l curl

Wew it worked fine!!!!!

-- 
Rodrigo Cesar Herefeld


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