delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/28/20:51:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <EmmesTechnologies200220515930272.8142@EMMES1>
Date: Mon, 28 Oct 2002 20:51:59 +1900
From: Mark Schoenberg <mark AT emmestech DOT com>
To: cygwin AT cygwin DOT com
Subject: Problem compiling cpp programs with gcc-3.2-1

     The problems described below appeared after I upgraded to the latest
versions of the cygwin release.  It disappeared when I went back to gcc-2.95.3,
leaving all the other utilities at the latest version.  This suggests to me the
problem lies in gcc-3.2.1, or in how I have it configured.

Why won't 
gcc simp.cpp -o simp 

compile the incredibly simple program below without generating e-messages like

/DOCUME~1/Mark/LOCALS~1/Temp/ccRtp1xR.o(.eh_frame+0x11):simp.cpp: undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status

     Why must I replace gcc with g++ or c++ after upgrading from gcc-2.95.3-5 to
3.2.1 ?

Are error messages like

/DOCUME~1/Mark/LOCALS~1/Temp/ccBuHJFC.o(.text+0x948):anv.cpp: undefined reference to `operator new(unsigned)'
/DOCUME~1/Mark/LOCALS~1/Temp/ccBuHJFC.o(.text+0x979):anv.cpp: undefined reference to `__cxa_begin_catch'
/DOCUME~1/Mark/LOCALS~1/Temp/ccBuHJFC.o(.text+0x9a5):anv.cpp: undefined reference to `__cxa_end_catch'

in response to compiling a slightly more complicated cpp program with gcc
related, or due to something else?  My slightly more complicated program will
compile if I replace gcc with g++, but the compiled program bombs immediately.

     Is there a simple fix other than using gcc-2.95.3-5 instead of 3.2-1?

Thank you, Mark Schoenberg
---------------------------------------------------------------------------------
/* Program simp.cpp*/
#include <Windows.h>
int WINAPI WinMain
(HINSTANCE hInst, HINSTANCE hPrevInst, char * cmdParam, int cmdShow)
{

  MessageBox (NULL,"Hello world", NULL, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);
  PostQuitMessage( -1 );
  exit(-1);
  
} //End WinMain





--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019