This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: building dlls, C and C++
Thanks for the examples, Chuck. I think I now understand why the ncurses++
dll fails to build corrrectly. The bug in egcs that Mumit refers to in the
c++ example appears to still exist in gcc-2.95.2. To build cygncurses++5.dll
and c++/demo.exe, the following mods are necessary:
1) the gcc bug - static *data* members do not pick up the "NCURSES_IMPEXP"
decoration correctly from the class declaration, so you have to add this
explicitly. (see dllclass.h in the dllhelpers pack you attached for an
example) Files affected:
c++/cursesapp.h
c++/cursesf.h
c++/cursesp.h
c++/cursesw.h
c++/cursslk.h
2) main() function - A correct main() for this example would be:
int main() { return Demo(); }
3) remove the #defines in c++/etip.h.in that force definition of
NCURSES_STATIC
with these changes, then the instructions in ncurses-5.2-2-src.tar.gz
produce a working cygncurses++5.dll and c++/demo.exe
Steve
----- Original Message -----
From: Charles S. Wilson <cwilson@ece.gatech.edu>
To: Steven O'Brien <steven_obrien@lineone.net>
Cc: <cygwin@cygwin.com>
Sent: Monday, December 04, 2000 3:22 PM
Subject: Re: building dlls, C and C++
> I don't see this problem. Here's an example, cooked up from Mumit's
> outdated dllhelpers kit, but redone to fit the more recent ld/gcc
> combinations and their capabilities.
>
> --Chuck
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com