Forum > General
Audiere library and FreePascal
OpenLieroXor:
Hi everybody,
I'd like to use the Audiere sound library in my application, but I can't find any wrapper for that library working with FPC. I've found two ones for Delphi on these pages: http://www.casteng.com/whypascal.shtml, http://www.afterwarp.net/resources/soundlib. Both of them don't want to work compiled with FPC. Anybody has any idea how to get this library to work?
Gintas:
I am going to figure it out. I also found another update Audiere bindings for Pascal http://code.google.com/p/audiere-bind-delphi/
Leledumbo:
--- Quote ---Both of them don't want to work compiled with FPC
--- End quote ---
The first one should. Did you supply {$mode delphi} or -Sd?
OpenLieroXor:
First of all, thank you for your replies.
I've checked the binding that Gintas posted. For me it crashes like two ones I mentioned before - in all three cases the source code compiles, but the binary crashes when using most of methods provided by Audiere DLL (with error EAccesViolation or runtime error 216). Of course I compile it with {$mode delphi}. All these bindings are designed for Delphi, so is it possible that FPC is not compatibile enough?
By the way, I also tried to use this library under c++ (compiled by gcc), and I needed to pass manually the "audiere.lib" file to the linker to get it to work. Is it possible that it's needed to do the same thing under FreePascal? If yes, how to use *.lib files with FPC?
Leledumbo:
--- Quote ---All these bindings are designed for Delphi, so is it possible that FPC is not compatibile enough?
--- End quote ---
Of course there's a chance, but AFAIK Cast II author uses it as well. So, it should work there. I haven't seen the code in the bindings, so I guess I'll check tonight. Anyway, you can recompile the bindings with -gl and re-run your programs to see where the crashes occur.
--- Quote ---Is it possible that it's needed to do the same thing under FreePascal? If yes, how to use *.lib files with FPC?
--- End quote ---
Not really, it depends. .lib are static libraries while .dll are dynamic. Under C/C++, the compiled files don't hold references to libraries, the programmer must supply it manually to the linker. In Pascal case, however, it's usually hardcoded within the unit in const section or as a macro (FPC only). I don't really remember whether FPC can handle xxx.lib, but if not just rename it to libxxx.a. When compiling, supply -Xt (-XD is preferred if both kinds exist).
Navigation
[0] Message Index
[#] Next page