Grzenio
Grzenio

Reputation: 36679

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 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?

Upvotes: 1

Views: 5581

Answers (2)

A.Oharriz
A.Oharriz

Reputation: 1

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

Upvotes: 0

Rob
Rob

Reputation: 78748

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.

Upvotes: 2

Related Questions