Re: [Vala] Using a C library



On Sat, 2015-04-18 at 21:07 +0200, yannick inizan wrote:
1) You must write a vapi for libspotify, then call it with "valac 
main.vala
--pkg libspotify --vapidir=/path/to/vapi"
2) sp_error doesn't exist, in your code I see "Spotify.Error" ;)

here a small example of vapi for libspotify ;) :
http://pastebin.com/XEEVUKMt


You shouldn't include the enum values in VAPIs.  Just public enum 
Error { OK, BAD_API_VERSION, API_INITIALIZATION_FAILED, … }


-Evan



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