0

I am trying to use GSL in Qt/C++. I compiled the library using MinGW in Windows following this tutorial.

I did not copy the directory, GSL is in c:/gsl-1.16

I linked in Qt like this:

win32{
INCLUDEPATH += C:/gsl-1.16/include /
INCLUDEPATH += C:/gsl-1.16/lib
LIBS += -LC:/gsl-1.16/bin -llibgsl-0 -llibgslcblas-0
LIBS += -L/usr/local/lib example.o -lgsl -lgslcblas -lm
}

And it recognizes the #include <gsl/...>.

But when I use a GSL object, the application just crashes at the start but it builds well.

Am I forgetting something or doing something wrong?

IAmInPLS
  • 4,051
  • 4
  • 24
  • 57
  • 1
    add folder that contains gsl.dll to your environment variable PATH, or copy dll next to your executable. use [dependency walker](http://www.dependencywalker.com/) to find out any other missing dynamic libraries. – baci Feb 05 '15 at 03:01

1 Answers1

0

I have the same problem and I checked my .exe by using dependency walker (Thanks @canberk)

It tells me that some delay-load dll is missing (that's why the build is OK)

those dll are the same as this article

After install Visual C++ Redistributable Packages for Visual Studio 2013 (I install both x86 and x64)

And restart Qt and clean the project, the problem is solved.

Community
  • 1
  • 1
maythe4thbewithu
  • 387
  • 1
  • 2
  • 12