Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-12 Thread Jonas Maebe
On 12 Aug 2009, at 06:46, leledumbo wrote: I was looking for something like "dynamic" http://www.freepascal.org/docs-html/user/usersu84.html That "dynamic" keyword is completely unrelated to importing external functions (both in FPC and in Delphi/Kylix). Jonas __

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread leledumbo
> I was looking for something like "dynamic" http://www.freepascal.org/docs-html/user/usersu84.html http://www.freepascal.org/docs-html/user/usersu84.html -- View this message in context: http://www.nabble.com/Dynamic-loading-shared-libraries-tp24924047p24929903.html Sent from the Free Pascal -

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread theo
Yes, this was possible with Kylix, however, it requires the usage of PIC also inside the caller. Thanks for the information. It's good to know about the h2pas option. I was not aware of it. In the many options --help show, it is described as -P use proc. vars for impo

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread Florian Klaempfl
theo schrieb: > >> How would the easy way be? >> > > I've just been looking into some old Kylix sources: > > interface > const LibName = ''; > function XftDrawCreate(display: PDisplay; win: XID; vis: PVisual; > colorm: longint): PXftDraw; cdecl; > > implementation > function XftDrawCreate(displ

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread theo
How would the easy way be? I've just been looking into some old Kylix sources: interface const LibName = ''; function XftDrawCreate(display: PDisplay; win: XID; vis: PVisual; colorm: longint): PXftDraw; cdecl; implementation function XftDrawCreate(display: PDisplay; win: XID; vis: PVisual

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread Jonas Maebe
On 11 Aug 2009, at 21:25, Jonas Maebe wrote: On 11 Aug 2009, at 21:18, theo wrote: Does h2pas have an option for this? -p Sorry, -P Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread Jonas Maebe
On 11 Aug 2009, at 21:18, theo wrote: Am I right, that with fpc it is only possible to write bindings for dynamically loading shared libraries (using LoadLibrary) the hard way? Meaning declare function like: init_alloc_root : procedure(root: PMEM_ROOT;block_size : Cardinal);extdecl;and

[fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread theo
Am I right, that with fpc it is only possible to write bindings for dynamically loading shared libraries (using LoadLibrary) the hard way? Meaning declare function like: init_alloc_root : procedure(root: PMEM_ROOT;block_size : Cardinal);extdecl; and then using GetProcedureAddress like: point