From: ···········@vms.eurokom.ie
Subject: _main or How does it work?
Date: 
Message-ID: <11613.28eb73c5@vms.eurokom.ie>
Hi there,

Here is the description of a small (big?) problem I have here.

I am trying to interface Lucid Common Lisp to C++ code compiled
with the AT&T C++ compiler.

I have a problem with the initialisation and the destruction of global variables:

The initialisation seems to be performed in C++ by the function "_main" which,
for each compiled file, calls (I don't know how!) an initialisation
function generated by the compiler. The function _main is called at
the beginning of the actual main. I currently don't understand how
_main knows this bunch of functions. The destruction of objects
refered to by global variables is also very mysterious...

I tried to call _main after loading the object files in Lisp: it failed.
Do you have any idea how to perform explicitely the initialisation
and destruction of global variables? Maybe the source of this _main
function would be helpful. Is it available?

Thank you for your help.

Regards,

Yves Tarbe
Thomson-CSF/RCC
Tel: +33 (1) 47 60 31 31
Fax: +33 (1) 47 60 35 05
Email: ··················@eurokom.ie
(Philippe will forward any answer to me)