Re: [ooc-compiler] Language Shootout and GCC 3.3.4
Brought to you by:
mva
|
From: Michael v. A. <Mic...@de...> - 2004-07-20 15:55:20
|
Stewart Greenhill <sgr...@ii...> writes: > [...] > For the Windows DLL architecture, functions that are exported or > imported from DLLs have to be specially declared using: > __declspec(dllimport) > __declspec(dllexport) > Normally, some preprocessor tricks are used so that a header file > defining a module can be used for both import and export. The > declaration is changed according to whether the compiled file is in > the same or different DLL. It would need a little thought to determine > what sort of model would work within oo2c. For Windows, we could add > these tags into the compiler-generated declarations, but this would > require the compiler to track which modules are grouped together in > which libraries. I think it already does this, but I can't say for > sure. The information to which shared library a module belongs is available in some places, although it is not passed on into the generated C code until now. The current code base writes information on library membership into the modules' symbol files. Adding it to the header files as well should be easy, since the .oh and .Sym carry pretty much the same information, only in different formats. Don't know if this is sufficient, though, since it only covers the identity of the used code. It looks to me like the identity of the using code plays into this dllimport/export issue as well. -- mva |