----- Original Message ----
From: David van der Spoel <sp...@xray.bmc.uu.se>
To: Discussion list for GROMACS users <gmx-users@gromacs.org>
Sent: Monday, March 23, 2009 12:40:19 PM
Subject: Re: [gmx-users] Trying to link C++ code with libgmx. Please help!

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.

Thank you for suggestion! It would be great if the library would be free from 
such nasty problems. 
Could you please post a full cvs command to get the dev version?

Sincerely,
Semen




_______________________________________________
gmx-users mailing list    gmx-users@gromacs.org
http://www.gromacs.org/mailman/listinfo/gmx-users
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-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php

Reply via email to