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: <20010924201805.37574.qmail@web14504.mail.yahoo.com> Date: Tue, 25 Sep 2001 06:18:05 +1000 (EST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: Re: DLLs and exceptions To: al DOT slater AT scluk DOT com, cygwin AT cygwin DOT com In-Reply-To: <000101c144f3$c2060280$458c0ca4@pavilion> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit --- Al Slater wrote: > Hi, > > I am working on a project which requires multiple dlls as follows. > > cbftest.exe calls libcbfo.dll, which calls libupdb.dll > > The problem is when an exception is thrown in libupdb.dll, I get the > message > "abnormal program termination" and the program stops. > > If I build the program without using dlls (ie build the program > against the > object files instead of the dlls) the exception gets thrown and > caught > properly. > > I am using the -mno-cygwin option. > > Any ideas where the problem may lie? > This is a known problem when throwing exceptions in one executable and catching them in another. The exception code must live in one and only one place. Check the mingw and the pthread-win32 archives for ways to do this (under mingw or -mno-cygwin) by putting the generic and C++ eh code from mingw libgcc into a dll. Danny http://travel.yahoo.com.au - Yahoo! Travel - Got Itchy feet? Get inspired! -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/