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

后端 未结 11 2178
半阙折子戏
半阙折子戏 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条回答
  •  太阳男子
    2021-02-19 11:11

    The version of GCC is probably not the issue. It's more likely to be a difference in the runtime library and a bug in your code that doesn't manifest itself when running against the Windows version of the runtime. You might want to post the code that segfaults and some more background information if you want a more specific answer.

    In general, it's best to develop under the environment you're going to use for running your code.

提交回复
热议问题