Results 1 to 2 of 2

Thread: Qt and MathGL

  1. #1
    Join Date
    Nov 2012
    Posts
    232
    Thanks
    118
    Thanked 18 Times in 10 Posts
    Platforms
    Windows Android

    Default Qt and MathGL

    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

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt and MathGL

    You are trying to use a binary library built with Qt4 (possibly with a binary incompatible GCC as well) in a program built for Qt5... This will not work.

  3. The following user says thank you to ChrisW67 for this useful post:

    8Observer8 (2nd February 2015)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.