Hello

I want to use MathGL in Qt

This is my steps:

  1. I download "Win32 GPL binaries for MinGW (build for i686)"
  2. I have 'includes' here: C:\MathGL\include
  3. I have 'libs' here: C:\MathGL\libs
  4. I read it: http://mathgl.sourceforge.net/doc_en/Using-QMathGL.html
  5. I installed 'GSL' by Cygwin from here: http://www.gnu.org/software/gsl/
  6. I wrote in *.pro:


INCLUDEPATH += "C:/cygwin/usr/include"
LIBS += "C:/cygwin/lib/libgsl.dll.a"

INCLUDEPATH += "C:/MathGL/include"
LIBS += "C:/MathGL/libs/libmgl-qt4.dll.a"

I wrote the code:
Qt Code:
  1. #include <mgl2/qmathgl.h>
  2.  
  3. Dialog::Dialog(QWidget *parent) :
  4. QDialog(parent),
  5. ui(new Ui::Dialog)
  6. {
  7. ui->setupUi(this);
  8.  
  9. // Create and setup QMathGL
  10. QMathGL *QMGL = new QMathGL( this );
  11. }
To copy to clipboard, switch view to plain text mode 

But I receive this error:
Starting D:\GoogleDrive\Qt\MathGL\build-QMathGLSample-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\QMathGLSample.exe...
The program has unexpectedly finished.
I hope you will help me. Thank you in advance