[Gambas-user] error calling external function from c library

Marcos Antonio Pandolfo Jr marcos at ...1756...
Fri Jun 20 03:15:15 CEST 2008


Benoit

    Thanks soo much for your help.... I attach a example writed in C that
contains the call of some functions in this library. The function that I
have problem is the ContinuaFuncaoSiTefInterativo... I believe that you
seeing this example you resolve the problem.... I dont have experience to
visualize the solution..... If you need I can send the libraries.... The
documentation of these libraries are writted in portugues and I think that
will be useless to you.

Regards



----- Original Message ----- 
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Thursday, June 19, 2008 6:53 PM
Subject: Re: [Gambas-user] error calling external function from c library


> On jeudi 19 juin 2008, Marcos Antonio Pandolfo Jr wrote:
> > In gambas 2.7.0 appears Illegal instruction in the call of function
> > TEF_inicia:
> >
> > EXTERN TEF_inicia(Resultado AS Pointer, Funcao AS String, Valor AS
String,
> > CuponFiscal AS String, DataFiscal AS String, Horario AS String, Operador
AS
> > String, ParamAdic AS String) IN "libclisitef" EXEC
> > "IniciaFuncaoSiTefInterativoA"
> >
> > PUBLIC SUB Main()
> > DIM la AS Pointer
> > DIM lala AS String
> >
> > la = Alloc(4)
> > TEF_inicia(la, "000000", "{200,00}", "{12345}", "20080618", "100000",
> > "{MARCOS}", "{}") 'gambas say illegal instruction in this line
> > lala = StrPtr(la)
> > Free(la)
> > PRINT lala
> >
> > Now is the call correct ?
> >
> > Thanks so much for the help and sorry my poor english.
> >
> >
>
> I don't know: you must ensure that the EXTERN declaration exactly matches
the
> binary interface of the called function (i.e. its C declaration), and the
> called function may crash too, not Gambas itself.
>
> -- 
> Benoit Minisini
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testedllia.c
Type: application/octet-stream
Size: 14163 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080619/5073c28d/attachment.obj>


More information about the User mailing list