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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章