[gmx-users] Trying to link C++ code with libgmx. Please help!
Semen Esilevsky
yesint4 at yahoo.com
Mon Mar 23 11:10:58 CET 2009
Dear gmx users,
I'm trying to read and write xtc files from my own code written in standard C++. I included xtcio.h and linking with libgmx.a. However when I'm trying to compile I get hundreds of errors like:
/usr/local/gromacs/include/gromacs/types/simple.h|124|error: reference to ‘real’ is ambiguous|
/usr/local/gromacs/include/gromacs/types/simple.h|109|error: candidates are: typedef float real|
/usr/include/c++/4.3/complex|538|error: template<class _Tp> const _Tp& std::real(const std::complex<_Tp>&)|
....
As far as I can figure out the problem is in simple.h where multiple redefinitions of real occur:
typedef real rvec[DIM];
typedef double dvec[DIM];
typedef real matrix[DIM][DIM];
typedef real tensor[DIM][DIM];
typedef int ivec[DIM];
typedef int imatrix[DIM][DIM];
I have absolutely no idea how to overcome this error. Any help is appreciated!
Regards,
Semen
More information about the gromacs.org_gmx-users
mailing list