Segmentation Fault before main() when using glut, and std::string?

前端 未结 3 1595
迷失自我
迷失自我 2020-12-05 14:17

On 64-bit Ubuntu 14.04 LTS, I am trying to compile a simple OpenGL program that uses glut. I am getting a Segmentation Fault (SIGSEV) before any line of code is executed in

3条回答
  •  北海茫月
    2020-12-05 14:59

    It's possible that your program and libGL are linked with, or using, two conflicting versions of a third library (maybe libc?). It's difficult to diagnose with the details you've provided. You could disable optimisations (-O0) and see if GDB gives up any further clues. You could see what dependencies both your program and libGL have by running ldd - this shows compile-time dependencies. Sorry I can only give suggestions - these types of runtime problems can occur for multiple reasons.

提交回复
热议问题