Re: gnome-defs





 These macros translate to 

BEGIN_GNOME_DCLS:
#ifdef __cplusplus
extern "C" {
#endif


and END_GNOME_DCLS:

#ifdef __cplusplus
}
#endif



  C++ compilers do function naming mangling (i.e. they change the name of the
fuction, so that overloading can be accomplished.)

These directives tells the compiler to leave the fucntion names the way you
named them.

 GLIB also has something similar for the same puropose:

 G_BEGIN_DECLS
 G_END_DECLS


 You can either use them or replace with the actual code. 

Hope this helps.

Harring.


--- Pieter Engelen <engelen pieter gmail com> wrote:

Hi,

I'm porting a tool from linux to windows.

This tool uses gnome-defs. I have looked at
http://developer.gnome.org/doc/API/libgnome/gnome-gnome-defs.html

But I don't understand what they mean with:
"This module only defines two macros for wrapping public function
interface declarations in a C-accesible way. They are usually used in
header files. They are empty macros for C compilation and they map to
extern "C" for C++ compilation."

Could some one explain this to me please.

How do I port a header file Whit this in?


Greetz
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com



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