Fix this statement:
Code:
gcc -c `pkg-config --libs glib-2.0` jpg.c
to be:
Code:
gcc -c `pkg-config --cflags glib-2.0` jpg.c
when you are compiling.
When you are linking your application (to build 'run'), then use the original pkg-config statement... you need that you get the library path.
Basically...
Code:
run : jpg.o
gcc -o run jpg.o `pkg-config --libs glib-2.0`
jpg.o : jpg.c regulator.c fprintf.c
gcc -c `pkg-config --cflags glib-2.0` jpg.c
clean :
rm run jpg.o
P.S. What is regulator.c and fprintf.c??
Bookmarks