Host Environment
To Reproduce
vcpkg install mathgl[hdf5]:x64-windows
Failure logs
Error:
C:\Dev\BasicTools\vcpkg\buildtrees\mathgl\src\2.4.3-ea7ba2a6a4\include\mgl2/datac.h(477): error C3861: 'mgl_abs': identifier not found
I did a search through all files in the source tree and this the only place it is used in the source code. The function is not defined anywhere.
Relevant Code:
#ifndef DEBUG
/// Get the value in given cell of the data
mreal v(long i,long j=0,long k=0) const { return abs(a[i+nx*(j+ny*k)]); }
/// Set the value in given cell of the data
void set_v(mreal val, long i,long j=0,long k=0) { a[i+nx*(j+ny*k)]=val; }
#else
/// Get the value in given cell of the data with border checking
mreal v(long i,long j=0,long k=0) const { return mgl_abs(mgl_datac_get_value(this,i,j,k)); }
/// Set the value in given cell of the data
void set_v(mreal val, long i,long j=0,long k=0) { mgl_datac_set_value(this,val,i,j,k); }
#endif
maybe it should use that instead:
inline mglData Abs() const
{ return mglData(true,mgl_datac_abs(this)); }
Try replacing mgl_abs with mgl_datac_abs and report the error upstream
After searching for mgl_abs, I found that this function was removed in a certain version, and we should report this to the official.
See history.
According to the history mgl_abs should be simply replaced by abs like in the debug case.
Hi @spindensity, thanks for reporting this issue.
I've fixed this issue in #8369, please update vcpkg and rebuild mathgl.
Thanks.
Most helpful comment
Error:
C:\Dev\BasicTools\vcpkg\buildtrees\mathgl\src\2.4.3-ea7ba2a6a4\include\mgl2/datac.h(477): error C3861: 'mgl_abs': identifier not foundI did a search through all files in the source tree and this the only place it is used in the source code. The function is not defined anywhere.
Relevant Code:
maybe it should use that instead:
Try replacing
mgl_abswithmgl_datac_absand report the error upstream