collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped

前端 未结 2 824
我在风中等你
我在风中等你 2021-01-12 07:53

I was learning OpenGL using GLFW, and didn\'t have a great understanding of makefiles at the time. I had OpenGL working, but I decided to learn makefiles more. I came up wit

2条回答
  •  难免孤独
    2021-01-12 08:47

    I came across exactly the same error.

    I'm developing on Windows and Linux at the same time and use Filezilla to transfer my files. The code built previously on Windows with Cygwin, but wouldn't after downloading files from my Linux host.

    The process was build on Windows ==> upload to Linux and build ==> make a few changes ==> download to Windows and build ==> get error.

    Then it dawned on me I had transferred over the Linux object files with the source, so I erased all the .o files and the build went fine.

    I can't say if this was @Zaerospi's problem or not, but it seems to have been the source of my error.

    Anyone else with the same error may want to try erasing their object files and rebuilding.

提交回复
热议问题