1

I am new to SDL I recently tried to run a SDL program on my Fedora machine and when I try to compile my program using the following command:

gcc -o displayimg displayimg.c -lSDL

I am getting the following error:

/var/bin/ld: cannot find LSDL
collect2: error: ld returned 1 exit status

I have used the SDL2/SDL.h header as well. Any help would be appreciated. I am on Fedora 24.

Matthew Schuchard
  • 25,172
  • 3
  • 47
  • 67
sss34
  • 57
  • 9

1 Answers1

3

I figured it out. I was linking

-LSDL 

instead of:

-LSD2

I followed this thread to help me out:

How to install SDL2 library in Fedora 20

Community
  • 1
  • 1
sss34
  • 57
  • 9