Short: V1.1 example.library in 100% C code Type: dev/c Uploader: stoecker@epost.de (Dirk Stoecker) Author: Dirk Stoecker, lots of other people example.library V1.1 (26.09.2002) An Amiga shared library in 100 % C language - coming with sources. Supported and tested compilers: SAS/C 6.5x, MaxonC (HiSoftC) 3.x, MaxonCPP 4.x, StormC 3.x, GCC 2.7.2.1, vbcc 0.8 This example library code is partly based on CLib37x by Andreas R. Kleinert. The main stuff comes from my own library startup code developed for xpkmaster.library and xadmaster.library. I decided to release my own code to show a somewhat different method. Some of the texts are taken from Andreas release. Best is to check both ways and choose the one you like most (or mix them :-). Thanks must go to: Andreas R. Kleinert for the initial idea in 1996. Gunter Nikl for developing the main SDI_compiler.h stuff and for telling me lots of improvements and bug fixes. All the others contributing to Andreas release. This sample library intends to make Amiga shared library sources compileable with any available Amiga C compiler - without any changes to the source code. This seams to be easily done: nearly any noticeable compiler for the Amiga does support generation of libraries by special linker commands and pre- generated object files. But when looking into the details, one will find out, that these linker functionality just reduces the influence of the programmer on how his sources are handled, that the pre-generated object files just originally were done in Assembler, and that each compiler does define its own interface definitions and usage rules. But as a programmer, it is important to have control over the _complete_ source code and to be able to compile it _anywhere_ with only minor changes, even better without any changes. Since most Amiga system modules - noticeable Libraries, Devices and Resources - do have startup-modules and other larger parts completely written in Assembler language, the most important task for getting inter-compiler and operating system independant sources in my opinion is, to completely migrate the interfaces to C language. If you can submit adjustments for the other compilers as mentioned above: feel free to send these. Feel free to use this source for own projects. History: 1.0 first version, Made with help of CLib by Andreas Kleinert and my library code used in xadmaster.library. 1.1 Updated the library to compile with MorphOS and allow tests of callback hooks. Please contact me: ********************************************************************* * snail-mail: * e-mail: * * Dirk Stoecker * stoecker@epost.de * * Geschwister-Scholl-Str. 10 * dirk@dstoecker.de * * 01877 Bischofswerda * world wide web: * * GERMANY * http://www.dstoecker.de/ * * phone: * pgp key: * * GERMANY +49 (0)3594/706666 * get from WWW pages or keyservers * ********************************************************************* Following is my PGP signature for the corresponding LhA-File. Use ' pgpv CLib-SDI.readme -o CLib-SDI.lha ' to check it. Key fingerprint: B9 F2 3A 1A 29 02 75 16 6A C6 5B 7D 5E F6 16 CF. All my releases after April 2001 have a PGP signature with this key. Be alarmed if signature is missing or wrong. -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use MessageID: BzKAVfcorfaBL5gDkpff0VVmdF7gnkOK iQCVAwUAPbwBjLOTsAT/iOY9AQFr2gP/ZZE1iStrUx/Hj1ufPjUiBP5dhQRpVstD 5uHt6AD0QHCkz3BzJHWU9YjgPND+UEu0R+Dq5+Q+6F+06u7UNfA50hxd5SS2faP5 J501I2ll4dpMl3zIQAIwyxjQV5rkTekeUPJeVFOtEsll3EZpQL+0yBn7NSVDT+6Z idaLctHaaGU= =WPKc -----END PGP SIGNATURE-----