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) –