how to build a mathgl application in ubuntu

71 views
Skip to first unread message

peter walber

unread,
Oct 7, 2020, 4:51:38 AM10/7/20
to MathGL
Hi,

I switched my OS from OpenSuse to ubuntu. I had many mathgl applications on OpenSuse. When I try to compile them on Ubuntu, i get the error message "fatal error: mgl2/mgl.h: file or directory not found".
I have installed mathgl with the command "sudo apt get mathgl". But eclipse does not find the include files of mathgl. To where does ubuntu install the include files ?

Peter

D Haley

unread,
Oct 7, 2020, 4:55:02 AM10/7/20
to mat...@googlegroups.com
Did you install the mathgl development headers? These are in a separate
package in debian distributions.

In order to install the version in the repositories, use:

sudo apt install libmgl-dev


Once I do that, on my system:

$ ls /usr/include/mgl2/
abstract.h    cont.h       eval.h       mgl_cf.h     parser.h   type.h
addon.h       datac_cf.h   fit.h        mgl.fs       pde.h      vect.h
base_cf.h     data_cf.h    Fl_MathGL.h  mgl.h        plot.h     vectors.fs
base.h        datac.h      fltk.h       mgl_pas.pas  prim.h     volume.h
canvas_cf.h   data.h       font.h       mglplot.fs   qmathgl.h  window.h
canvas.h      define.h     glut.h       mpi.h        qt.h       wnd.h
canvas_wnd.h  dllexport.h  gsl.fs       opengl.h     surf.h     wx.h
config.h      evalc.h      mathgl.fs    other.h      thread.h

You should then be able to compile a simple application something like this:

===

#include <mgl2/mgl.h>

int main()
{
}

===

> --
> You received this message because you are subscribed to the Google
> Groups "MathGL" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mathgl+un...@googlegroups.com
> <mailto:mathgl+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mathgl/17d604ca-c0bb-49d8-be8d-af9df7b5972do%40googlegroups.com
> <https://groups.google.com/d/msgid/mathgl/17d604ca-c0bb-49d8-be8d-af9df7b5972do%40googlegroups.com?utm_medium=email&utm_source=footer>.

peter walber

unread,
Oct 7, 2020, 4:59:42 AM10/7/20
to mat...@googlegroups.com
Hi,


thanks,


that solved the problem.


Peter

Am 07.10.20 um 10:54 schrieb D Haley:
> sudo apt install libmgl-dev
Reply all
Reply to author
Forward
0 new messages