This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc Core Dump


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.

Wrong mailing list. Please re-read http://cygwin.com/lists.html.

Your sample code below works for me.

Do NOT reply to cygwin-apps at cygwin dot com .

Start a new thread on cygwin at cygwin dot com .

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 <stdio.h>
> #include <stdlib.h>
> 
> /* 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");
> }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]