C program compiled with cygwin in Windows works, segmentation fault under Linux. Is cygwin GCC 'bad'?

后端 未结 11 2143
半阙折子戏
半阙折子戏 2021-02-19 10:11

For my Programming 102 class we are asked to deliver C code that compiles and runs under Linux. I don\'t have enough spare space on my hard drive to install Linux alongside Wind

11条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 11:10

    I haven't heard of anything specific about GCC weirdness under Cygwin but in your case it would probably be a good idea to use the -Wall command-line option to gcc to show all warnings, to see if it finds anything that might be causing the segfault in your code.

提交回复
热议问题