[gmx-users] Trying to link C++ code with libgmx. Please help!
David van der Spoel
spoel at xray.bmc.uu.se
Mon Mar 23 11:40:19 CET 2009
Semen Esilevsky wrote:
> 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!
We are about to release a special external library for this purpose. As
a matter of fact you can download the development version of it using
cvs. (cvs co libxdrfile). trr support is not functional yet, but xtc works.
> gmx-users mailing list gmx-users at gromacs.org
> Please search the archive at http://www.gromacs.org/search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php
David van der Spoel, Ph.D., Professor of Biology
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
More information about the gromacs.org_gmx-users