g++: -l[some]: linker input file unused because linking not done

这只是一个警告,在编译(-c)的时候使用了"-l"选项,这个应该用于链接。 

下面有一段来自于http://gcc.gnu.org/ml/gcc-help/1999-12n/msg00351.html的原文:

The message that gcc reported is correct. When you supply a library (even a compiled object file like you did) to a command that does no linking (gcc -c), gcc simply informs you that the library was not used because no linking was done. You didn't ask it to. Since you specified -c, "source" files are going to be compiled into .o object files, NOT into an executable, nor is anything going to be done with any object files. Gcc saw the extraneous object file supplied and simply ignored it.

你可能感兴趣的:(C/C++,Programes,编程技巧)