So many warnning when I compiled base.c ?
- From: "Wu Yin" <lazy fox wu gmail com>
- To: gtk-list gnome org
- Subject: So many warnning when I compiled base.c ?
- Date: Mon, 11 Aug 2008 17:47:48 +0800
I wrote a Makefile for base.c, like following:
+----------------------------------------------------------
|# Makefile
|
|CFLAGS+=`pkg-config --cflags --libs gtk+-2.0`
|
|base:base.o
| $(CC) $< -o $@ $(CFLAGS)
+----------------------------------------------------------
But when I run "make", there were many warnning information like below came out:
+----------------------------------------------------------
| gcc `pkg-config --cflags --libs gtk+-2.0` -c -o base.o base.c
| gcc: -lgtk-x11-2.0: linker input file unused because linking not done
| gcc: -lgdk-x11-2.0: linker input file unused because linking not done
| gcc: -latk-1.0: linker input file unused because linking not done
| gcc: -lgdk_pixbuf-2.0: linker input file unused because linking not done
| gcc: -lm: linker input file unused because linking not done
| gcc: -lpangocairo-1.0: linker input file unused because linking not done
| gcc: -lpango-1.0: linker input file unused because linking not done
| gcc: -lcairo: linker input file unused because linking not done
| gcc: -lgobject-2.0: linker input file unused because linking not done
| gcc: -lgmodule-2.0: linker input file unused because linking not done
| gcc: -ldl: linker input file unused because linking not done
| gcc: -lglib-2.0: linker input file unused because linking not done
| gcc base.o -o base `pkg-config --cflags --libs gtk+-2.0`
+----------------------------------------------------------
I know "gcc -c" make this happen, but how to change Makefile to fix it?
What the Makefile should be commonly?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]