[Gambas-user] Calling library functions in Gambas2

easuter easuter at ...626...
Sun Sep 2 22:22:01 CEST 2007




Benoit Minisini wrote:
> 
> On jeudi 30 août 2007, easuter wrote:
> 
>> However, calling the simplest function in libparted 
>> (ped_get_version) did not return anything useful, but then again, I'm
>> probably doing something wrong.
>>
>> PUBLIC EXTERN ped_get_version() AS String IN "libparted"
>>
>> PUBLIC SUB main()
>>    PRINT ped_get_version()
>> END
>>
>> returns an empty string.
>> If I make the extern declaration use an Integer as the return data-type
>> for
>> ped_get_version, then a very useless number is returned (-1212003088).
>> Same happens when made to use Pointer and if I use
>> StrPtr(ped_get_version()), then the same empty string is returned as when
>> I
>> use the String datatype.
>>
>> I'd really appreciate any help in pointing out mistakes here, and if
>> possible some indicators as to what can be done about the
>> ped_filesystem_type_get function.
>>
>> Cheers,
>>
>> Eugéne
> 
> Apparently this is a bug... Try the latest revision, it should work now!
> 
> Regards,
> 
> -- 
> Benoit Minisini
> 

Well, I've got Gambas 1.9.50 up and running here, as well as the latest
parted release installed.
Still no joy though, ped_get_version() continues to return an empty string
:-\ 
-- 
View this message in context: http://www.nabble.com/Calling-library-functions-in-Gambas2-tf4295859.html#a12452966
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list