next up previous index
Next: Using Shared Libraries Up: Separate Loading Previous: Separate Loading

Using .o Files

First we load the tk library.

.

Using this approach it is possible to write extension initialisation files, insert them into a directory which resides in the ECLiPSe library path and load them on demand using lib/1  .

For Tree on i386_linux we would have in the file
:- lib(tk).

:- load("/home/micha/tcl/tree-4.0.1/src/libTkTree.a "
    "-u _Tree_Init -u _Dir_Init -lg++")

:-
    (tcl_interp(I) ->
        true
    ;
        tk([]),                % not yet started
        tcl_interp(I)
    ),
    call_c('Tree_Init'(I), _),
    call_c('Dir_Init'(I), _).
to start Tk and initialise the extension.


next up previous index
Next: Using Shared Libraries Up: Separate Loading Previous: Separate Loading



Micha Meier
Tue Jul 2 09:49:39 MET DST 1996