STR-363: stratego apps should export an initialization function
In order to allow dynamic loading of stratego apps, init-stratego-application.h should include a non-static initialization function. Adding this function should be sufficient:
void SRTS_dynload_stratego_initialize_module()
{
init_module_constructors();
init_module_constant_terms();
}(or, alternatively, just copy the one from stratego-dl: https://svn.cs.uu.nl:12443/repos/StrategoXT/trunk/stratego-dl/src/include/srts/init-stratego-application.h)
Submitted on 25 July 2005 at 10:05
Issue Log
STR-363, martin:
This might result in all kinds of linking problems (duplicate symbols), so I don’t know if this is a very good solution. In the Stratego Shell, I used a quick hack to get a reference to the initialization function (but there might even be more than 1!) by setting the variable “SRTS_stratego_initialize” to NULL before loading the library, the default constructors of the module create a fresh linked list of initializers, that can be invoked after loading the module.
Log in to post comments