Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3A31D6D4.4FCFACCE@ece.gatech.edu> Date: Sat, 09 Dec 2000 01:53:08 -0500 From: "Charles S. Wilson" X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: "Steven O'Brien" , cygwin AT sources DOT redhat DOT com Subject: Re: cygncurses++5.dll [WAS Re: building dlls, C and C++] References: <000c01c05f8c$0b61e8c0$04288cd4 AT emerald> <3A2E5262 DOT 9413477D AT ece DOT gatech DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Looks good to me -- demo.exe + cygncurses++5.dll seems to work just great with your changes. I've incorporated them (along with others) into ncurses-5.2-3 which should be available for test very soon. Thanks, Steven!!! --Chuck "Charles S. Wilson" wrote: > > 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 -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com