[Gambas-user] Re: Linking to a c library (libxxx.so.0

Joris Meijer jorisenpetra at ...681...
Tue Nov 9 20:22:29 CET 2004


Here is the latest example off a possible way to dynamically link with a
C-library without knowing the function prototy at compile time. It does
not giva a answer to all the questions but answers some. 

About the portebility, I think it is portable but to where would you
like to port??

greetz Joris Meijer


On Sun, 2004-11-07 at 16:14 +0100, Benoit Minisini wrote:
> On Sunday 07 November 2004 14:49, you wrote:
> > Sorry it took me so long to answer but I have made a little test
> > programm to see if it is possible to call a dynamic library function
> > without knowing its prototype at compile time. I think it should work
> > like this. Have a look!!.
> >
> > To compile:
> >
> > make
> > make lib
> 
> Great :-) But many questions:
> 
> Which asm instructions must you insert to push a (char *), a short int, a 
> long, a double, a long long ? Can you send me an example ?
> 
> How is returned a double ? A (char *) ? A long long ?
> 
> Is this method portable ? I'm not sure... Is it possible to make this method 
> portable ?
> 
> Thanks in advance for your answers - Please send it to the devel mailing-list, 
> many other people may be interested! :-)
> 
> Regards,
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_dl.tar.gz
Type: application/octet-stream
Size: 3547 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20041109/f992332f/attachment.obj>


More information about the User mailing list