xffm, libraries and 'interface'

edscott wilson garcia edscott at xfce.org
Wed Sep 22 21:05:13 CEST 2004


El mié, 22-09-2004 a las 10:59, Maarten Boekhold escribió:
> Hi Edscott,
> 
> I've started (slowly) in the actual porting of xffm to cygwin, and I 
> noticed that the 'libxffm_basic' etc. libraries *do* make 
> calls/references into the xffm binary (and potentially other binaries?) 
> itself.
> 
> Do you happen to have a list of those symbols that are 'exported' from 
> xffm to these libraries? I need to create a 'def' file that tells the 
> libraries at link time where those symbols are, eg.
> 
> =============
> IMPORTS
> tree_details = xffm.exe.tree_details
> etc.
> =============
> 
> or the link will fail on cygwin.

Do you need a list of all symbols exported from the executable to normal
libraries or to module type libraries? 

Also, do you need a list of symbols exported from normal libraries to
modules? And from normal libraries to each other? 

I suspect you will need all.

If that is the case, I can change all "extern" statements to 
G_MODULE_IMPORT, and then write a perl parser to create an IMPORTS file
(this will make maintainance easier since symbols are moved around at
times).

> 
> I'll keep poking myself, but it's hard without being very familiar with 
> the source code. The current process consists of trying to link, looking 
> at a few 'undefined references', trying to find where those symbols are 
> defined, adding to the def file, repeating the whole thing.
> 
> Additionally, all those symbols need to be defined as "G_MODULE_EXPORT" 
> in the place they are defined. Since the use of gmodule isn't very 
> spread in xffm yet, I am instead doing:
> 
> #ifdef HAVE_CYGWIN
> #define DLLEXPORT __declspec(dllexport)
> #else
> #define DLLEXPORT
> #endif
> 
> and then putting DLLEXPORT in front of the symbol definitions. Can you 
> recommend a 'central' place to put this #define?


Using "G_MODULE_EXPORT" for all exported symbols would be no problem
(AFAIK, in Linux it gets expanded to nothing). In fact, it would make
the G_MODULE_IMPORT scheme described above a bit clearer. Would using
G_MODULE_EXPORT in front of the symbol definitions work instead of
DLLEXPORT?


regards,

Edscott



> Maarten
> 



More information about the Xfce4-dev mailing list