0
我試圖用G ++,這些文件同時依賴於libxml2和GSL庫的問題,whene我給編譯命令
g++ -Wall -I/usr/include/libxml2 -lgsl main.cpp YUNucNet.cpp src/*.cpp -lxml2 -lm
未定義的參考`gsl_vector_free」
它alaways給編譯一些C++文件我很多鏈接錯誤的未定義參考gsl
'/tmp/ccCJrl0t.o: In function `WnSparseSolve__Phi__solve:
WnSparseSolve.cpp:(.text+0x24bc): undefined reference to `gsl_vector_calloc'
WnSparseSolve.cpp:(.text+0x24cc): undefined reference to `gsl_vector_calloc'
WnSparseSolve.cpp:(.text+0x24e9): undefined reference to `gsl_vector_calloc'
WnSparseSolve.cpp:(.text+0x24ff): undefined reference to `gsl_vector_alloc'
WnSparseSolve.cpp:(.text+0x250f): undefined reference to `gsl_vector_calloc
....etc
這裏有什麼問題??
可能的重複[爲什麼庫的鏈接順序有時會導致GCC錯誤?](http://stackoverflow.com/questions/45135/why-does-the-order-in-which-libraries-正在連接 - 有時因 - 錯誤 - 在-GCC) –