glue for libraries?

R James Noble kjx at comp.vuw.ac.nz
Wed Dec 2 19:43:08 UTC 1992


Rob Reiss asks:
> Is is possible to create glue for just a couple functions that are
> part of a larger pre-compiled standard library.

Yes - I've done this quite successfully for large bits of Xlib with
the standard release Self compiler. 

> But when I try to call the function in Self the functions bomb because
> they are not linked to the libcps.so file.  Can I link the libcps.so
> file into this one somehow?

The trick is to _statically_ link the library into the .o file while
making the .so file. Given your SmallFile.o 

	ld -o SmallFile.so SmallFile.o -Bstatic -lcps

This worked for me under SunOS and gcc - of course, your mileage may
vary. (At least we don't need sed on the assembler any more :-)

James

James Noble, Graduate Student, Computer Science Department
Victoria University, Box 600, Wellington 1, New Zealand
kjx at comp.vuw.ac.nz




More information about the Self-interest mailing list