Search code examples
c++linuxqt-creatorgsl

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?


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.