users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Always the problem between gplc/gcc--obj_chain and initializa tion


From: Mayer, Jim
Subject: RE: Always the problem between gplc/gcc--obj_chain and initializa tion
Date: Fri, 30 Aug 2002 11:40:46 -0400

The "object chain" mechanism looks very similar to that used to invoke
static object constructors in C++.  At least on my system (Redhat Linux
7.3), this works well with the standard "dlopen/dlclose" dynamic object file
loading mechanism.  Have you considered moving to a C++ compatible scheme?
Each module would include a "static object" that performs any required load
time initialization.  You could then support both link time and run time
loading of modules and make it much easier to use gprolog as a library.

Just a thought.

-- Jim

> -----Original Message-----
> From: address@hidden [mailto:address@hidden
> Sent: Friday, August 30, 2002 10:34 AM
> To: Timo Karjalainen
> Cc: address@hidden
> Subject: Re: Always the problem between gplc/gcc--obj_chain and
> initialization
> 
> 
> 
> On Friday, August 30, 2002, at 09:12  AM, Timo Karjalainen wrote:
> 
> > Is there a way to suppress this obj_chain stuff in GNU 
> Prolog? If one 
> > has
> > a C main() and doesn't use the initialization directive, 
> these symbols
> > shouldn't be necessary. Also suppressing the search would speed up 
> > program
> > start up.
> 
> Unfortunately, I believe that the obj_chain processing is 
> essential to 
> the basic gprolog execution. As I mentioned in my earlier 
> note there are 
> many system initializations, as well as any number of user 
> initializations. I think that the system initializations 
> *must* be done 
> in order to run gprolog *at all*, and these are done by way of the 
> obj_chain mechanism.
> 
> -lindsey
> 
> 
> 
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]