On Oct 12, 2007, at 1:22 PM, Pascal Viandier wrote:
Hi gpc crew,
Is there a way to generate a shared object (.so) under unix with gpc? I found nothing about this in GPC documentation. I tried "gpc --automake -o foo.so foo.pas" on the command line (foo.pas being a module) This does not work: I get an error about an undefined reference to 'main'
Is it possible at all to generate a shared object with gpc? Does someone have any clue?
It depends upon the options supported by the build target. If the target system supports shared objects/libraries, you'll need additional target specific, command line parameters.
To find out if your system supports shared objects/libraries and what the command line parameters to use are, try gpc --target-help or consult the system's gcc documentation. If neither of those help, the authoritative documentation can be found in gcc/config sources used for the target OS building. (You may have to a little looking around in the config files used. There seems to be a variety of ways different target OS's get their command line specs defined. Some variant of the root words "share" or "dynamic" seems to be the common command line parameter naming scheme used.)
If you need more specific help, try posting your gpc -v information so people know what the the specific target it is you need the command line parameter(s) for.
Gale Paeper gpaeper@empirenet.com