Sean Seefried wrote: > The expression "__declspec(dllimport)" is a Microsoft extension and > this is included precisely when __INSIDE_CYGWIN__ is *not* defined. > Since I assume Cygwin is built using Visual C++ and > __declspec(dllimport) is only accepted by this compiler I assume you > have to have it undefined when compiling. Or is there something > fundamental I'm missing here?
dllimport and dllexport are fully supported by gcc, they are not specific to VC++. It would be impossible for gcc to be a functioning windows compiler if it did not support them. And Cygwin is most certainly not built with any MS tools. The reason for the #ifdef is that these headers are included inside Cygwin itself. In other words, you can't dllimport a symbol that's in the same module, you can only dllimport from other external modules. > If I'm right (and I know I'm probably wrong) then __INSIDE_CYGWIN__ > would have to be defined when compiling things with gcc. Where is it > defined though? It's only defined when compiling Cygwin itself (in winsup.h), *not* when generally using gcc. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/