plugin suffix

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Wed May 9 19:46:39 UTC 2001


On Wed, 9 May 2001, John Hinsley wrote:

> OK folks, sometime tonight I'm going to try and get
> UnixOSProcessPlugin.c built so that I can play with Squeak Shell.
>
> I'm still unsure of whether it makes more sense to re-build Squeak from
> scratch and finally simply copy my old image and change over or to
> simply copy over the generated header files.

I'm not sure I understand the two ways you're suggesting. The
image/changes combo can live whereever you choose, so nothing prevents you
frome leaving it where it is right now. The VM and plugins can be located
somewhere else.

> But does this plugin require a special suffix? In my ignorance I'd be
> inclined to do
>
> gcc -o UnixOSProcessPlugin UnixOSProcessPlugin.c
>
> but this could be very wrong if squeak expects something else!

Indeed. A plugin is a shared object ending in .so (assuming you run Linux
or some other not too esoterical *nix), so the basic compile line should
be this:

gcc --shared -o UnixOSProcessPlugin.so UnixOSProcessPlugin.c

Of course, you also need to give the location of header files
(-I../path/to/src/generated), define HAVE_CONFIG_H
(-DHAVE_CONFIG_H), and specify the location of the platform dependend
header file sqUnixConfig.h, which is automatically created by autoconf
when you build Squeak from source (-I../path/to/your/builddir).

> Where do I put the plugin anyway?

Best put it where it can be found ;-)

1. Current working directory (from where you start Squeak),
2. standard locations ($LD_LIBRARY_PATH if set, otherwise
   from /etc/ld.so.conf),
3. /usr/local/lib/squeak/...ver../ (try "squeak -version").

For testing I usually just leave it in the CWD.

-- Bert





More information about the Squeak-dev mailing list