[fpc-pascal] fp universal library ?
Fred van Stappen
fiens at hotmail.com
Sun Feb 9 12:53:07 CET 2014
Hello everybody.
Here next episode of the conversion of a useful fp unit into a universal library...
After a hard battle, ... i win. But mainly because of the extremely high quality of fpc. The compiler gives me useful tips to realise that unique library.
Unique because that dynamic loaded library load other libraries dynamically too.
Here some tips :
- If you use classes and threads in the unit you want to convert into library, it is a good idea to use dynamic arrays inside the unit. So the user dont have to create that classes in his program, only set length of array inside the unit (without to forget class.create, of course). That mainly for foreign language who will use your library (they could not create your fpc class but if all is done inside the library, no problem).
- If you use threads, do not forget to add, in linux , in uses section : cthreads.
- Warning : the exported name of function/proc are case sensible... Good to know before to loose (like me) lot of hair.
- The most strange (for me) is to create a "Pascal header". Usually, for library, i used h2pas, or c2pas, but here no ;-) . So no big problem to create the wrapper.
- Now i have to find : Pas2C, Pas2Java, Pas2Basic, Pas2Net,... (or some brave heart to help me to create wrappers for foreign language.)
Conclusion : fpc is FABULOUS.
Many thanks to all the creators and congrat for the high care you have done for Libraries compilation too.
PS : Im very, very happy, till now, all my wishes become truth with fpc.
PS : I have tested the lib and it works ( dynamic load other lib too ).
I can play songs with effects perfectly. Now i have to find a way to export-import the data-buffer (dynamic array of float) . But that is for the "custom user DSP" feature, all the bild-in DSP provided by uos-unit are working perfectly.
Fred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140209/ccb8d159/attachment.html>
More information about the fpc-pascal
mailing list