This is the mail archive of the cygwin@sources.redhat.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] |
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@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
ncurses-5.2-c++-dll-2.patch.gz
-- 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] |