Where does gcc go to link the library?
I have a simple program with jpeg.c and my Makefile was something like this:
all:
gcc -std=c99 -Wall jpeg.c -o jpeg
clean:
$(RM) jpeg
My code didn't compile until I added "-ljpeg"
all:
gcc -std=c99 -Wall jpeg.c -o jpeg -ljpeg
clean:
$(RM) jpeg
I'm just wondering where exactly does gcc go looking for the jpeg library as specified in the -l option?
+3
source to share