Mail Archives: cygwin/2000/12/06/12:26:13
Very cool -- thanks. I'll take a look at this over the weekend.
--Chuck
Steven O'Brien wrote:
>
> The only outstanding issue from my previous mail on ncurses++ is the need to
> invent a main() function in the dll build which was not needed in the static
> build.
>
> The c++ sources include a default main() (in c++/cursesmain.cc) which is
> linked into the static lib and therefore picked up by a static link, so no
> need for the application writer to provide one.
>
> However, when the main() is put into a DLL, the linker can no longer find it
> when building an exe - hence the link error about WinMain AT 16. Modifying
> c++/Makefile so that c++/cursesmain.o is ommited fro the dll, but then added
> to the import library with ar, means that the shared build now works without
> an application main() just like the static build.
>
> As far as I can tell, the runtime behaviour of c++/demo.exe is now identical
> whether linked shared or static. I attach a patch which includes all the
> mods I made doing these trials. It replaces
> CYGWIN-PATCHES/ncurses-5.2-c++-dll.patch. So to build ncurses, using dynamic
> linking, from the cygwin sources:
>
> tar zxvf ncurses-5.2-2-src.tar.gz
> cd ncurses-5.2
> export CFLAGS=-DNCURSES_DLL
> export CXXFLAGS=$CFLAGS
> ./configure --enable-symlinks --enable-sigwinch --enable-colorfgbg \
> --enable-tcap-names --with-manpage-symlinks --without-de
> bug \
> --with-normal --disable-termcap --prefix=/usr \
> --with-default-terminfo-dir=/usr/share/terminfo \
> --enable-echo --with-manpage-symlinks
> patch -p1 < CYGWIN-PATCHES/ncurses-5.2-2-dll.patch
> patch -p1 < ncurses-5.2-c++-dll-2.patch
> make
>
> In the above, replace "ncurses-5.2-c++-dll-2.patch" with the path where you
> have placed (and unzipped) the attached patch file.
>
> Steve
>
> ------------------------------------------------------------------------
> Name: ncurses-5.2-c++-dll-2.patch.gz
> ncurses-5.2-c++-dll-2.patch.gz Type: application/x-unknown-content-type-patch_auto_file
> Encoding: base64
>
> ------------------------------------------------------------------------
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -