Previous Next Table of Contents

6. Compiling, Installing, Loading a Custom Object

Mops custom objects need to include mops.h, mops.h in turn includes Togl (OpenGL, Tcl/Tk) and RI headers. When compiling your custom object, all you need to do is to make sure the compiler finds all includes. See the Makefile of The Mops on how to collect all necessary information to build -I directives. Compile your source with the -c switch. Then use the right switch for your compiler (-shared ?) to make a shared object (.so) from the .o and you should be ready to test (>cc -shared -o foo.so foo.o).

Install the shared object along with the Tcl file containing the property GUI procedure and other stuff.

To load a custom object use the appropriate menu entry in the File menu or the lc (load custom) command. Both methods will automatically change the working directory to the location of the shared object to allow it to find the accompanying tcl file more easily. Do not use the load command!


Previous Next Table of Contents