From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19400 invoked by alias); 8 Mar 2004 19:40:19 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 19379 invoked from network); 8 Mar 2004 19:40:17 -0000 Received: from unknown (HELO rent.teradyne.com) (198.51.251.8) by sources.redhat.com with SMTP; 8 Mar 2004 19:40:17 -0000 Received: from chorus.teradyne.com (chorus.teradyne.com [131.101.1.195]) by rent.teradyne.com (8.8.8+Sun/8.8.8) with ESMTP id OAA17457 for ; Mon, 8 Mar 2004 14:40:16 -0500 (EST) From: nirav.dalal@teradyne.com Received: from jaypeak.corp.teradyne.com (jaypeak.corp.teradyne.com [131.101.17.23]) by chorus.teradyne.com (8.8.8+Sun/8.7.1) with ESMTP id OAA21749 for ; Mon, 8 Mar 2004 14:40:20 -0500 (EST) Subject: Exception Handling switch gives linking problems To: gcc-help@gcc.gnu.org Message-ID: Date: Mon, 08 Mar 2004 19:40:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00073.txt.bz2 Hi, I'm having issues with GCC compiling & linking when I remove " -fno-exceptions" switches/option with x86 target. For example: Case A] This example works fine. >gcc -mdll -DBUILD_DLL -O3 -c -fno-exceptions foo.cpp >dllwrap --dllname=foo.dll foo.o Case B] This example compiles OK, but does NOT link. >gcc -mdll -DBUILD_DLL -O3 -c foo.cpp >dllwrap --dllname=foo.dll foo.o The "dllwrap" command gives me following error/s: foo.o(.text+0x28):foo.cpp: undefined reference to `__gxx_personality_sj0' foo.o(.text+0x24a):foo.cpp: undefined reference to `__gxx_personality_sj0' foo.o(.text+0x632):foo.cpp: undefined reference to `__gxx_personality_sj0' dllwrap: gcc exited with status 1 So if I want to remove "-fno-exceptions" or in other words enable exception handling in GCC, the link command does NOT like it. How else can we enable exception handling? Any help on this problem is appreicated. The GCC version I'm using is: >gcc --version gcc (GCC) 3.3.1 (mingw special 20030804-1) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Thanks, - Nirav