On Apr 6, 2011, at 9:08 PM, Qin Qiao wrote: > the command I use: > g++ test.cpp -o test -I/usr/local/gromacs/include/gromacs > -L/usr/local/gromacs/lib -lgmx > ./test > Error: > ./test: error while loading shared libraries: libgmx.so.6: cannot open shared > object file: No such file or directory > > But there's libgmx.so.6 in: > /usr/local/gromacs/lib/libgmx.so.6 > /usr/local/gromacs/lib/libgmx.so.6.0.0
The operating system doesn't know that it should look in /usr/local/gromacs/lib for the library. Try (if you are using linux): export LD_LIBRARY_PATH=/usr/local/gromacs/lib ./test Hope this helps, Lutz -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/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/Support/Mailing_Lists