Hello.
Thanks to Mister Hinst, i was able to load and run, in Windows, with
dynlib.pas, SoundTouch.dll. Perfect and re-thanks.
Now, i begin a other hard battle : load and run in Linux, libSoundTouch.so.
With the extremely helpful message of Mister Ewald :> Try to find the names of
the symbols defined in the shared object (nm comes to mind).
I run nm and find the name of the procedures ( PS : without nm-Ewald's tip, you
must be a high soothsayer to find it)
For example, a C called procedure : soundtouch_getVersionString() becomes :
_ZN10soundtouch10SoundTouch16getVersionStringEv() !!!
And, believe it or not... it works...
I have only a problem with one procedure:
This c procedure is declared as this :
SOUNDTOUCHDLL_API void __cdecl soundtouch_setSampleRate(HANDLE h, unsigned int
srate);
And i translate it like that :
soundtouch_setSampleRate : procedure(h : THandle; srate : cardinal); cdecl;
and for dynamic-loading :
Pointer(soundtouch_setSampleRate):= GetProcAddress(LibHandle,
Pchar('_ZN10soundtouch10SoundTouch13setSampleRateEj'));
Sadly i get that message when i try to load that procedure :
An unhandled exception occurred at $00007F7D76D61AE8:
EAccessViolation: Access violation $00007F7D76D61AE8
(program exited with code: 217)
Does somebody have some light for this ?
Many thanks.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal