Anonymous - 2013-05-29

Hello all,

So,

My question is, i'm using mingw32 and Qt.

The thing is, i really don't know what am i doing wrong. On the download page i can find these two options for ming:

Win32 GPL binaries for MinGW (build for i686)
Win32 LGPL binaries for MinGW (build for i686, no GSL and HDF5 support)

which is pretty impressive, several libraries don't even have any support for ming. Congrats MathGL.

In any case, i tried to download both of them and couldnt fit them. One includes several missing include files - which are from other libraries (i dowloaded it - GSL) but i was getting undefined reference whilce tryint to to build.

So I downloaded the

source file with cmake build system.

And i could see several other files/headers/examples on this package. Does this means that Mathgl when using with mingw has different constraints then using with other compilers?

My best shot- i guess - is with Win32 GPL. I could link it on my project:

INCLUDE_DIRECTORIES($ENV{MATHGL_DIR}/include)
INCLUDE_DIRECTORIES($ENV{GSL_DIR}/include)
set( MATHGL_LIBRARIES debug $ENV{MATHGL_DIR}\lib\libmgl.a )
set( GSL_LIBRARIES debug $ENV{GSL_DIR}\lib\libgsl.a )

target_link_libraries(
dominio
${PetroCore_LIBS}
${PetroWidgets_LIBS}
${QT_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${MATHGL_LIBRARIES}
${GSL_LIBRARIES}

Including on these libraries the GSL (http://www.gnu.org/s/gsl/) library, which was not present on my system but i downloaded since it is necessary to MathGl.

On my example, i am instantiating it as a regular widget and following the example as shown in http://www.manpagez.com/info/mathgl/mathgl-1.11.2/mathgl_en_21.php .. my errors are shown bellow:

CMakeFiles\Visualizer.dir/objects.a(MathGLTab.cpp.obj): In function ZN9MathGLTab6sampleEP7mglBasePv': C:/diagenese/diagenese/dev/itagen/src/Visualizer/MathGLPanel/MathGLTab.cpp:30: undefined reference to_impmgl_rotate'
C:/diagenese/diagenese/dev/itagen/src/Visualizer/MathGLPanel/MathGLTab.cpp:31: undefined reference to _imp__mgl_box' CMakeFiles\Visualizer.dir/objects.a(MathGLTab.cpp.obj): In functionMathGLTab':
C:/diagenese/diagenese/dev/itagen/src/Visualizer/MathGLPanel/MathGLTab.cpp:47: undefined reference to _imp___ZN7QMathGLC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE' C:/diagenese/diagenese/dev/itagen/src/Visualizer/MathGLPanel/MathGLTab.cpp:51: undefined reference to_imp
_ZN7QMathGL6updateEv'

Thanks in advance for any help,
Leonardo