Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top