[fpc-pascal]dll (with c convention) under win and linux

Alexis Halbot-Schoonaert a.halbotschoonaert at free.fr
Sun Nov 5 16:48:34 CET 2000


Hello,

Sebastian =?iso-8859-1?Q?G=FCnther?= a écrit:
> 
> Alexis Halbot-Schoonaert wrote:
> >
> > ./dlltest: error in loading shared libraries:
> > libtestdll.so: cannot open shared object file:
> > No such directory
> >
> > Though, libtestdll.so is in the same directory than dlltest. I tried to
> > copy libtestdll.so in /usr/sbin, and i have the same problem. So,
> > supposed it was not because of the path...
> 
> Not if you didn't run 'ldconfig' after copying the .so to /usr/sbin...
> [BTW, you should use /usr/local/bin or /usr/local/sbin instead...]


I copied my library in /usr/local/bin
I also used ldconfig

I tried to use the library before and after copiing, using ldconfig
MyDirectory
but it didn't work.
I have always the same error when i want to use it :

./dlltest: error in loading shared libraries:
libtestdll.so: cannot open shared object file:
No such directory


> 
> > And i'd like the main program and the library to use the c call
> > convention (with cdecl ?). What is the way to do it ?
> 
> Attention, this is not the default on Win32. Win32 libraries normally
> use 'stddecl' conventions. On Linux, cdecl is standard, of course.
> 
> > program dlltest;
> >
> > procedure p1(x:pointer); external 'testdll' name 'P1';
> [...]
> 
> procedure p1(x:pointer); cdecl; external 'testdll' name 'P1';
> 
> and so on
> 
> - Sebastian

thank you for your help.
Alexis.





More information about the fpc-pascal mailing list