We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example.c:(.text+0x13d): undefined reference to
On Debian sid/unstable with libsdl2-dev 2.24.0+dfsg-1, I get:
$ git log --oneline --no-decorate -1 1dcbae1 Merge pull request #17 from MichielP1807/master $ pkg-config --cflags --libs sdl2 -D_REENTRANT -I/usr/include/SDL2 -lSDL2 $ cc `pkg-config --cflags --libs sdl2` -o gifplay gifdec.c example.c /usr/bin/ld: /tmp/ccxL4R2w.o: in function `main': example.c:(.text+0x13d): undefined reference to `SDL_Init' /usr/bin/ld: example.c:(.text+0x146): undefined reference to `SDL_GetError' /usr/bin/ld: example.c:(.text+0x15d): undefined reference to `SDL_Log' /usr/bin/ld: example.c:(.text+0x197): undefined reference to `SDL_CreateWindowAndRenderer' /usr/bin/ld: example.c:(.text+0x1a0): undefined reference to `SDL_GetError' /usr/bin/ld: example.c:(.text+0x1b7): undefined reference to `SDL_Log' /usr/bin/ld: example.c:(.text+0x21f): undefined reference to `SDL_SetWindowTitle' /usr/bin/ld: example.c:(.text+0x283): undefined reference to `SDL_SetRenderDrawColor' /usr/bin/ld: example.c:(.text+0x28f): undefined reference to `SDL_RenderClear' /usr/bin/ld: example.c:(.text+0x29b): undefined reference to `SDL_RenderPresent' /usr/bin/ld: example.c:(.text+0x2d2): undefined reference to `SDL_CreateRGBSurface' /usr/bin/ld: example.c:(.text+0x2e6): undefined reference to `SDL_GetError' /usr/bin/ld: example.c:(.text+0x2fd): undefined reference to `SDL_Log' /usr/bin/ld: example.c:(.text+0x373): undefined reference to `SDL_PollEvent' /usr/bin/ld: example.c:(.text+0x397): undefined reference to `SDL_Delay' /usr/bin/ld: example.c:(.text+0x3a1): undefined reference to `SDL_GetTicks' /usr/bin/ld: example.c:(.text+0x3c9): undefined reference to `SDL_LockSurface' /usr/bin/ld: example.c:(.text+0x449): undefined reference to `SDL_MapRGB' /usr/bin/ld: example.c:(.text+0x487): undefined reference to `SDL_MapRGB' /usr/bin/ld: example.c:(.text+0x4ae): undefined reference to `SDL_MapRGB' /usr/bin/ld: example.c:(.text+0x52a): undefined reference to `SDL_UnlockSurface' /usr/bin/ld: example.c:(.text+0x53d): undefined reference to `SDL_CreateTextureFromSurface' /usr/bin/ld: example.c:(.text+0x55b): undefined reference to `SDL_RenderCopy' /usr/bin/ld: example.c:(.text+0x567): undefined reference to `SDL_RenderPresent' /usr/bin/ld: example.c:(.text+0x573): undefined reference to `SDL_DestroyTexture' /usr/bin/ld: example.c:(.text+0x578): undefined reference to `SDL_GetTicks' /usr/bin/ld: example.c:(.text+0x5bd): undefined reference to `SDL_Delay' /usr/bin/ld: example.c:(.text+0x5e8): undefined reference to `SDL_FreeSurface' /usr/bin/ld: example.c:(.text+0x5f4): undefined reference to `SDL_DestroyRenderer' /usr/bin/ld: example.c:(.text+0x600): undefined reference to `SDL_DestroyWindow' /usr/bin/ld: example.c:(.text+0x605): undefined reference to `SDL_Quit' collect2: error: ld returned 1 exit status
The text was updated successfully, but these errors were encountered:
I encounterd with the similar issue on FreeBSD 13.1. Do you have any clue how to fix that or maybe you already have found a workaround?
Any suggestions are highly appreciated.
Sorry, something went wrong.
cc pkg-config --cflags --libs sdl2 -o example gifdec.c example.c
pkg-config --cflags --libs sdl2
I use this and encounter the same problem.
I' fix it by using gcc -o example example.c gifdec.c -I/usr/local/include/SDL2 -lSDL2.I'll submit a pr.
No branches or pull requests
On Debian sid/unstable with libsdl2-dev 2.24.0+dfsg-1, I get:
The text was updated successfully, but these errors were encountered: