Skip to content

Missing match lib. Undefined reference to symbol (Debian GNU/Linux) #2

Description

@blogdron
gcc src/*.c `pkg-config --cflags --libs SDL2_ttf`  -o blockamok
/usr/bin/ld: /tmp/user/1000/ccMOfFUx.o: undefined reference to symbol 'tan@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:15: compile] Error 1

For fix need add -lm in https://github.com/carltheperson/blockamok/blob/main/Makefile

compile:
-	gcc src/*.c `pkg-config --cflags --libs SDL2_ttf` -o blockamok
+	gcc src/*.c `pkg-config --cflags --libs SDL2_ttf` -lm -o blockamok

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