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]

Re: can you export a c++ class from a cygwin32/mingw32 dll?


Jonathan Wilson <wilsonj@xoommail.com> writes:
> can you export a c++ class from a cygwin32/mingw32 dll?
> how do you do it?

What have you done/tried?

> i have an existing dll that exports a c++ class... can i use that from
> cygwin32? the dll was writem in ms vc++ and i also have a matching
> borland c++ dll. i do have the source but i am unsure as to how it would
> compile in cygwin32...

If you're using my compiler distribution(s), which you should if you're
using C++, then the following works just fine:
  
  class __declspec(dllexport) 
  foo 
  {
    // ....
  };

The next release, gcc-2.95, should be better in this respect. 

http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ for more
info.

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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