This is giving segmentation fault. If I comment that "mglData" line and reexecute it.. It is executing fine. Any help is appreciated. Please feel free to correct me and my code.. Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, are you sure that there is no conflict of different installed MathGL version? I.e. MathGL 1. and MathGL 2.? or MathGL 2.2. and MathGL 2.3. or from SVN?
Because this is typical situation for Win32 -- there are several MathGL version on PC and code was compiled with one of them, but it use DLL in PATH for another version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am facing segmentation fault on usage of mglData.
My code is:
include<mgl2 mgl.h="">
include<iostream>
include<vector>
define _USE_MATH_DEFINED
include<cmath>
int main()
{
double a = new double[50];
for(int i=0;i<50;i++)
{
a[i] = sin(M_PIi/49.0);
}
mglData y;
y.Set(a,50);
}
This is giving segmentation fault. If I comment that "mglData" line and reexecute it.. It is executing fine. Any help is appreciated. Please feel free to correct me and my code.. Thanks in advance
Hi, are you sure that there is no conflict of different installed MathGL version? I.e. MathGL 1. and MathGL 2.? or MathGL 2.2. and MathGL 2.3. or from SVN?
Because this is typical situation for Win32 -- there are several MathGL version on PC and code was compiled with one of them, but it use DLL in PATH for another version.