errors compiling example code

Using GLFW
  • cellsheet

    cellsheet - 2013-08-26

    Hello, when I had tried to compile the example code for glfw3, I got the following errors:

    /tmp/ccCdEKoi.o: In function main': example.cpp:(.text+0x38): undefined reference toglfwCreateWindow'
    example.cpp:(.text+0x5b): undefined reference to glfwMakeContextCurrent' example.cpp:(.text+0x7a): undefined reference toglfwWindowShouldClose'
    collect2: error: ld returned 1 exit status

    I am compiling with g++ example.cpp -o example -lGL -lglfw and when I installed the latest glfw 3.0.2, it installed without problems.

  • codesnip3r

    codesnip3r - 2013-08-28

    Looks like you need to link in the glfw library directory.

    Try using -L/path/to/glfw


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks