I Use the ver 2.3.2 with the visual studio 2013.
A:the first problem
I found the mgl-glut can't work
if i change the code in the glut.cpp
//origin-----------------------------------------------------------------------------
HMGL MGL_EXPORT mgl_create_graph_glut(int (draw)(HMGL gr, void p), const char title, void par, void (load)(void p))
{
mglCanvasGLUT *g = new mglCanvasGLUT;
g->Window(0,0,draw,title,par, load);
return g;
}
to
//new-----------------------------------------------------------------------------
HMGL MGL_EXPORT mgl_create_graph_glut(int (draw)(HMGL gr, void p), const char title, void par, void (load)(void p))
{
mglCanvasGLUT *g = new mglCanvasGLUT;
//g->Window(0,0,draw,title,par, load);
g->Window(1, 0, draw, title, par, load);
return g;
}
it will does work.
B: the second problem:
I use the gsl v1.16 library, but I found it will have these link error
1>MSVCRT.lib(MSVCR120.dll) : error LNK2005: _acosh 已经在 eval.obj 中定义
1>MSVCRT.lib(MSVCR120.dll) : error LNK2005: _atanh 已经在 eval.obj 中定义
If I change the code in the eval.cpp, line 497
// origin
double MGL_LOCAL_CONST asinh(double x) { return log(x+sqrt(xx+1.)); }
double MGL_LOCAL_CONST acosh(double x) { return x>1 ? log(x+sqrt(xx-1.)) : NAN; }
double MGL_LOCAL_CONST atanh(double x) { return fabs(x)<1 ? log((1.+x)/(1.-x))/2 : NAN; }
to
// new
//#ifdef WIN32
double MGL_LOCAL_CONST asinh(double x) { return log(x+sqrt(xx+1.)); }
double MGL_LOCAL_CONST acosh(double x) { return x>1 ? log(x+sqrt(xx-1.)) : NAN; }
double MGL_LOCAL_CONST atanh(double x) { return fabs(x)<1 ? log((1.+x)/(1.-x))/2 : NAN; }
it will successfully generate.
Anonymous