Hi,
I'm working on a library for GPC, and I want to make it available to the public. But I don't know in which way.
At the moment the library contains some wrappers to other libraries (libao, libsndfile, libggi and libfreetype) and some other functionality (loading/saving .ppm files (graphics)).
The largest part of the wrappers is done in C, and then there is some Pascal to wrap that.
If you want to take a look at the stuff, you can download http://industree.org/libguakagpc/download/PASCAL-0.20020619.tar.bz2
I don't know what would be a good place to put the files. And maybe I need to work with units, but I'm not a very experienced Pascal programmer, so I don't have experience with units. (I started doing Pascal just for this project actually.) What happens if you do a "uses GPC" or "uses GMP"?
Are the files supposed to go into a directory like /usr/lib/gcc-lib/i386-linux/2.95.4/units/?
Could this stuff also be incorporated into the GPC distribution? Just like GMP?
One 'problem' might be that I don't provide all the functionality of the libraries in the wrappers. I'm writing it for someone who will never use all the available functionality, so right now that's a good idea. If it will become available to more people, it might be a good idea to make stuff more general.
greetz, Kasper
Kasper Souren wrote:
I'm working on a library for GPC, and I want to make it available to the public. But I don't know in which way.
At the moment the library contains some wrappers to other libraries (libao, libsndfile, libggi and libfreetype) and some other functionality (loading/saving .ppm files (graphics)).
The largest part of the wrappers is done in C, and then there is some Pascal to wrap that.
If you want to take a look at the stuff, you can download http://industree.org/libguakagpc/download/PASCAL-0.20020619.tar.bz2
Unfortunately, I currently don't have the time to take a closer look, but I hope someone else will ...
I don't know what would be a good place to put the files.
You're welcome to put it under contrib on the GPC home page. To put it there, you can upload them via the upload form (in the "download area"), or mail them to me.
And maybe I need to work with units, but I'm not a very experienced Pascal programmer, so I don't have experience with units. (I started doing Pascal just for this project actually.) What happens if you do a "uses GPC" or "uses GMP"?
In short, a unit consists of an interface and an implementation part. The interface can contain declarations (const, type, var) and routine headers. The implementation contains normal declaration and routines with bodies, including those that were declared in the interface (but may have some private routines). When a program or another unit does `uses Foo', it gets access to the declarations in the interface of the unit.
So indeed, such a library should be a unit -- or perferably, several units for the different C libraries.
Are the files supposed to go into a directory like /usr/lib/gcc-lib/i386-linux/2.95.4/units/?
No, this directory is only for the GPC installation, i.e. it may be overwritten completely when installing a new GPC version. For third-party Pascal units, I recommend /usr/local/units, in analogy to /usr/local/{include,lib} for C stuff.
Could this stuff also be incorporated into the GPC distribution? Just like GMP?
Maybe in the future (but if/when this happens, it will be installed in /usr/lib/gcc-lib/i386-linux/2.95.4/units/). But for now, I suggest to leave it separate, so it can be looked at and tested etc. ...
One 'problem' might be that I don't provide all the functionality of the libraries in the wrappers. I'm writing it for someone who will never use all the available functionality, so right now that's a good idea. If it will become available to more people, it might be a good idea to make stuff more general.
Sure.
Frank
Frank Heckenbach wrote:
In short, a unit consists of an interface and an implementation part. The interface can contain declarations (const, type, var) and routine headers. The implementation contains normal declaration and routines with bodies, including those that were declared in the interface (but may have some private routines). When a program or another unit does `uses Foo', it gets access to the declarations in the interface of the unit.
So indeed, such a library should be a unit -- or perferably, several units for the different C libraries.
Ok, I will spend some time making units of the wrappers, and I will upload the results to the GPC homepage.
greetz, Kasper