Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <00c701c2e3e2$db82c650$78d96f83@pomello> From: "Max Bowsher" To: , References: <28460 DOT 1046953964 AT www42 DOT gmx DOT net> <730 DOT 1046955717 AT www42 DOT gmx DOT net> Subject: Re: gcc Core Dump Date: Thu, 6 Mar 2003 13:18:20 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Klaus DOT Moschner AT gmx DOT de wrote: > Hi, > > I'm a newbie in programming under Cygwin, and I have a very basic > problem with gcc: > Any help is appreciated. OK, right mailing list this time, but, as I said in my previous reply, it works fine for me. So, you are going to have to try to debug it a bit more yourself. Ever used gdb? You could try: $ gdb prog3 (gdb) run (gdb) bt and post the output of the 'bt' command. Max. > This code compiles and runs without any problems under Dev++ > > This is the output when I compile and run: > $ gcc -Wall prog3.c -o prog3 > > $ ./prog3.exe > Hello World > Segmentation fault (core dumped) > > $ > > This is the source code: > > /* Include Files */ > #include > #include > > /* Function Declarations */ > void PrintHW(); > > int main() > { > char quit; > printf("Hello World\n"); > PrintHW(); /* Prints Hello Function */ > printf("Hello World\n"); > quit = '\0'; > > return 0; > } > > > void PrintHW() > { > printf("Hello Function\n"); > } -- 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/