Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22080

gcc/g++ using linkerflag "-lSDL2"

$
0
0

acordingly to lazyfoos sdl tutorial https://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/cli/index.phpi setup sdl2. (and it runs with the given Terminal command) "g++ 01_hello_SDL.cpp -w -lSDL2 -o 01_hello_SDL"

i cant remember the-lsdl2 flag and i don't know why i have to use it.i also cant comprehend why gcc already know a SDL realatet option like -lsdl2.

how do people know they have to use this flag? i cant find anything usefull on this, people seem to just take it as a fact and tutorials didn't tell why to do so.

hope someone have time for this, i would be glad if i could gain knowledge to set up other libaries by my self next time


Viewing all articles
Browse latest Browse all 22080

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>