[Gambas-user] Signal 11, when calling external function

Jussi Lahtinen jussi.lahtinen at ...626...
Thu Jun 10 17:33:42 CEST 2010


I changed code to (makes very much more sense to me):
void Aja_Mtrx(int k0[][31], int k1[][31], int k2[][31])

But it still doesn't work with Gambas3.
With Gambas2 everything is OK.

Jussi


On Thu, Jun 10, 2010 at 18:18, Jussi Lahtinen <jussi.lahtinen at ...626...> wrote:
> Function declaration is from example code I found, I don't understand
> logic of that notation.
> BUT it works with Gambas2, and it worked fine with earlier revision of Gambas3.
> I'm not saying that it makes it correct way pass 2d arrays, but makes
> me puzzled...
>
> Jussi
>
>
> 2010/6/10 Benoît Minisini <gambas at ...1...>:
>>> Hi!
>>> I have use external function for certain tasks successfully, but I run
>>> into problems with recent revision of Gambas.
>>>
>>> In Gambas:
>>> Public Extern Aja_Mtrx(pk0 As Pointer, pk1 As Pointer, pk2 As Pointer)
>>> In "libMlpp"
>>>
>>> Public k0 As New Integer[31, 31]
>>> Public k1 As New Integer[31, 31]
>>> Public k2 As New Integer[31, 31]
>>>
>>> Aja_Mtrx(k0.Data, k1.Data, k2.Data)
>>>
>>> In C:
>>> void Aja_Mtrx(int (*k0)[31], int (*k1)[31], int (*k2)[31])
>>>
>>>
>>> Gambas3 revision 2995  Ubuntu 10.04 64bit
>>>
>>> Jussi
>>>
>>
>> I'm not sure that the extern declaration matches: An Integer[31, 31] in Gambas
>> is a int [31 * 31] in C, not a int (*)[31].
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>




More information about the User mailing list