开发者

How can I make QtCreator compile with gsl library?

I am trying to use the GNU Scientific Library (GSL) http://www.gnu.org/software/gsl/ in QtCreator. How can开发者_JAVA百科 I tell Qt creator to add these flags: http://www.gnu.org/software/gsl/manual/html_node/Linking-programs-with-the-library.html to link correctly?


You need to edit your .pro file and add the extra libs by hand, e.g.:

LIBS += -L/usr/local/lib example.o -lgsl -lgslcblas -lm

See the QMake documentation for more information.


Edit your .pro file and extra libs and include in windows:

 `win32{ 
   INCLUDEPATH += C:/gsl-1.11/include/ 
   INCLUDEPATH += C:/gsl-1.11/lib  
   LIBS += -LC:/gsl-1.11/bin -llibgsl-0 -llibgslcblas-0  
   }`  

then the problem is solved

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜