当前位置: 技术问答>linux和unix
为什么我的程序编译的时候总是报有错,但是程序却编译出来了,而且能运行?
来源: 互联网 发布时间:2015-05-15
本文导语: [root@HWM button]# make gcc -c buttons.cc `pkg-config gtkmm-2.0 --cflags --libs` gcc: --export-dynamic: linker input file unused because linking not done gcc: -lgtkmm-2.0: linker input file unused because linking not done gcc: -lgdkmm-2.0: linker input fi...
[root@HWM button]# make
gcc -c buttons.cc `pkg-config gtkmm-2.0 --cflags --libs`
gcc: --export-dynamic: linker input file unused because linking not done
gcc: -lgtkmm-2.0: linker input file unused because linking not done
gcc: -lgdkmm-2.0: linker input file unused because linking not done
gcc: -latkmm-1.0: linker input file unused because linking not done
gcc: -lgtk-x11-2.0: linker input file unused because linking not done
gcc: -lpangomm-1.0: linker input file unused because linking not done
gcc: -lglibmm-2.0: linker input file unused because linking not done
gcc: -lsigc-1.2: 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: -lpangoxft-1.0: linker input file unused because linking not done
gcc: -lpangox-1.0: linker input file unused because linking not done
gcc: -lpango-1.0: 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 -o Button main.o buttons.o `pkg-config gtkmm-2.0 --cflags --libs`
#Makefile文件的内容
Button : main.o buttons.o
gcc -o $@ $^ `pkg-config gtkmm-2.0 --cflags --libs`
.cc.o:
gcc -c $
gcc -c buttons.cc `pkg-config gtkmm-2.0 --cflags --libs`
gcc: --export-dynamic: linker input file unused because linking not done
gcc: -lgtkmm-2.0: linker input file unused because linking not done
gcc: -lgdkmm-2.0: linker input file unused because linking not done
gcc: -latkmm-1.0: linker input file unused because linking not done
gcc: -lgtk-x11-2.0: linker input file unused because linking not done
gcc: -lpangomm-1.0: linker input file unused because linking not done
gcc: -lglibmm-2.0: linker input file unused because linking not done
gcc: -lsigc-1.2: 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: -lpangoxft-1.0: linker input file unused because linking not done
gcc: -lpangox-1.0: linker input file unused because linking not done
gcc: -lpango-1.0: 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 -o Button main.o buttons.o `pkg-config gtkmm-2.0 --cflags --libs`
#Makefile文件的内容
Button : main.o buttons.o
gcc -o $@ $^ `pkg-config gtkmm-2.0 --cflags --libs`
.cc.o:
gcc -c $