Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Cannot compile #2

Description

@marco-trovato

I am on Debian 12 on a x64 CPU, I followed the instruction and installed all dependencies, but at the last step make failed.
Maybe I did something wrong... Any help?

Output:

$ make
[ 13%] Built target sfml-system
[ 24%] Built target sfml-audio
[ 29%] Built target SOIL
[ 32%] Built target TMXParser
[ 33%] Linking CXX executable zelda
/usr/bin/ld: CMakeFiles/zelda.dir/src/game.cpp.o: in function `Game::Tick()':
game.cpp:(.text+0x57f): undefined reference to `glutPostRedisplay'
/usr/bin/ld: CMakeFiles/zelda.dir/src/game.cpp.o: in function `Game::Render() const':
game.cpp:(.text+0x695): undefined reference to `glutSwapBuffers'
/usr/bin/ld: CMakeFiles/zelda.dir/src/game.cpp.o: in function `Game::Reshape(int, int)':
game.cpp:(.text+0x6c2): undefined reference to `glutReshapeWindow'
/usr/bin/ld: game.cpp:(.text+0x6df): undefined reference to `glutReshapeWindow'
/usr/bin/ld: CMakeFiles/zelda.dir/src/main.cpp.o: in function `main':
main.cpp:(.text+0x186): undefined reference to `glutInit'
/usr/bin/ld: main.cpp:(.text+0x190): undefined reference to `glutInitDisplayMode'
/usr/bin/ld: main.cpp:(.text+0x19a): undefined reference to `glutGet'
/usr/bin/ld: main.cpp:(.text+0x1a7): undefined reference to `glutGet'
/usr/bin/ld: main.cpp:(.text+0x1c7): undefined reference to `glutInitWindowPosition'
/usr/bin/ld: main.cpp:(.text+0x1dc): undefined reference to `glutInitWindowSize'
/usr/bin/ld: main.cpp:(.text+0x1eb): undefined reference to `glutCreateWindow'
/usr/bin/ld: main.cpp:(.text+0x25d): undefined reference to `glutSetCursor'
/usr/bin/ld: main.cpp:(.text+0x26c): undefined reference to `glutDisplayFunc'
/usr/bin/ld: main.cpp:(.text+0x27b): undefined reference to `glutReshapeFunc'
/usr/bin/ld: main.cpp:(.text+0x28a): undefined reference to `glutKeyboardFunc'
/usr/bin/ld: main.cpp:(.text+0x299): undefined reference to `glutKeyboardUpFunc'
/usr/bin/ld: main.cpp:(.text+0x2a8): undefined reference to `glutSpecialFunc'
/usr/bin/ld: main.cpp:(.text+0x2b7): undefined reference to `glutSpecialUpFunc'
/usr/bin/ld: main.cpp:(.text+0x2c6): undefined reference to `glutMouseFunc'
/usr/bin/ld: main.cpp:(.text+0x2d5): undefined reference to `glutIdleFunc'
/usr/bin/ld: main.cpp:(.text+0x2e9): undefined reference to `glutMainLoop'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/zelda.dir/build.make:1260: zelda] Error 1
make[1]: *** [CMakeFiles/Makefile2:189: CMakeFiles/zelda.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions