This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Building C++ library DLL


Hi all,
maybe it's not the correct list where to ask for since my problem is GCC related, but I try anyway.
 
With Microst Visual C++ it is possible to write something like
 
class __declspec(dllexport) foo {
    static int foo_var;
 
    void foo_function();
}
 
This will export the function and the static variable without need to put the __declspec(dllexport) on every line of the class definition.
 
When using the library, one can write
 
class __declspec(dllimport) foo {
 ...
 
My question : Is it supposed to work with GCC too ? If not, are there any plans to implement such a nice feature ? This make porting of C++ library to windows a lot more easy, since there is a lot less __declspec directive to put in the header files ...
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]