Hello everyone:<br><br>Recently I am trying to use the xdr library
downloaded from gromacs org to read xtc files. However when I link my
program with the library there is an error. When I ran the make test,
all the tests were passed. Thus I think that the library should work
just I don&#39;t know how to link the program. I tried to read the makefile
in the library but it is very <br>
complicated and beyond my scope. My program is very simple:<br>//source file of cm.cc<br>#include&quot;/home/kun/xdr/include/xdrfile/xdrfile_xtc.h&quot;<br>int main()<br>{<br>    char * fn=&quot;fdifal&quot;;<br>
    int n=1;<br>
    read_xtc_natoms(fn, &amp;n);<br><br>    return 0;<br>}<br>and I could compile it. When I use <br>g++ cm.o /home/kun/xdr/lib/libxdrfile.a there is a link error:<br>cm.o: In function `main&#39;:<br>cm.cc:(.text+0x2d): undefined reference to `read_xtc_natoms(char*, int*)&#39;<br>



collect2: ld returned 1 exit status<br>Could anyone help me? <br><br>Thank you very much.<br>Have a nice weekends<br><br>Kun