On Sun, 2009-05-17 at 10:56 -0700, Semen Esilevsky wrote:
> Ok, I have found the bug.
> In file xdrfile_xtc.h conditional directives should be "#ifdef __cplusplus", 
> not "#ifdef CPLUSPLUS" !

<clip>

> After that I have functional text program. 
> Now, I tried to make a test with C++ with this simplest program:
> 
> 
> #include "xdrfile.h"
> #include "xdrfile_xtc.h"
> int main(){
> XDRFILE* xd = xdrfile_open("a.xtc","r");
> int n;
> read_xtc_natoms("a.xtc",&n);
> }


That, or you can just use

extern C {
#include "xdrfile.h"
#include "xdrfile_xtc.h"
}

int main()
and so on

The same thing also works for gromacs header files.
-- 
------------------------------------------------------
Jussi Lehtola, FM, Tohtorikoulutettava
Fysiikan laitos, Helsingin Yliopisto
jussi.leht...@helsinki.fi, p. 191 50632
------------------------------------------------------
Mr. Jussi Lehtola, M. Sc., Doctoral Student
Department of Physics, University of Helsinki, Finland
jussi.leht...@helsinki.fi
------------------------------------------------------


_______________________________________________
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