[gmx-users] g++ compiling with gromacs library
Kit Sang Chu
kschu at ucdavis.edu
Wed Nov 21 23:04:31 CET 2018
I just checked and found no readir.h in any of directories.
simon at hpc1:~/Softs/gromacs-5.1/opt/include/gromacs$ find . -name readir.h
simon at hpc1:~/Softs/gromacs-5.1/opt/include/gromacs$
I believe there are problems in my colleague's code. I should definitely
discuss with him further. Thanks for all your help, Justin, Davis and
Alexander.
Regards,
Simon
On Wed, Nov 21, 2018 at 1:40 PM Justin Lemkul <jalemkul at vt.edu> wrote:
>
>
> On 11/21/18 4:37 PM, Kit Sang Chu wrote:
> > Hi Justin,
> >
> > You need -I, not -l (capital "i" is for "Include")
> > Tried both. Same error somehow.
>
> No, you got something different when you (correctly) used -I. Old code
> may assume a certain directory structure, and that structure may change
> from version to version, particularly with reorganization of header
> files. If you get a "no such file or directory" error, you should locate
> the file you need or modify the code that contains that #include
> statement to point to the correct file (which in some cases may have
> changed its name, as well as its location).
>
> -Justin
>
> > simon at hpc1:~/GlyRotv4$ g++ -I /home/simon/Softs/gromacs-5.1/opt/include
> > GlyRot.cpp -o GlyRot.o -Wall -c
> > GlyRot.cpp:32:10: fatal error: gromacs/gmxpreprocess/readir.h: No such
> file
> > or directory
> > #include "gromacs/gmxpreprocess/readir.h"
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > compilation terminated.
> > simon at hpc1:~/GlyRotv4$ g++ -l /home/simon/Softs/gromacs-5.1/opt/include
> > GlyRot.cpp -o GlyRot.o -Wall -c
> > GlyRot.cpp:8:10: fatal error: gromacs/commandline.h: No such file or
> > directory
> > #include "gromacs/commandline.h"
> > ^~~~~~~~~~~~~~~~~~~~~~~
> > compilation terminated.
> >
> >
> > Simon
> >
> >
> > On Wed, Nov 21, 2018 at 1:33 PM Justin Lemkul <jalemkul at vt.edu> wrote:
> >
> >>
> >> On 11/21/18 3:56 PM, Kit Sang Chu wrote:
> >>> Somehow the problem persists. Here I try -l
> >>> /home/simon/Softs/gromacs5-1/opt/include again.
> >> You need -I, not -l (capital "i" is for "Include")
> >>
> >> -Justin
> >>
> >>> g++ -l /home/simon/Softs/gromacs-5.1/opt/include GlyRot.cpp -o GlyRot.o
> >>> -Wall -c
> >>> GlyRot.cpp:8:10: fatal error: gromacs/commandline.h: No such file or
> >>> directory
> >>> #include "gromacs/commandline.h"
> >>> ^~~~~~~~~~~~~~~~~~~~~~~
> >>> compilation terminated.
> >>>
> >>>
> >>> Regards,
> >>> Simon
> >>>
> >>>
> >>> On Wed, Nov 21, 2018 at 12:18 PM Alexander Tzanov <
> >>> Alexander.Tzanov at csi.cuny.edu> wrote:
> >>>
> >>>> Use -I/path to your include directory in CFLAGS.
> >>>>
> >>>> On Nov 21, 2018 2:59 PM, David van der Spoel <spoel at xray.bmc.uu.se>
> >> wrote:
> >>>> Den 2018-11-21 kl. 19:09, skrev Kit Sang Chu:
> >>>>> Hi everyone,
> >>>>>
> >>>>> I have a Makefile from my colleague and I am trying to make it
> >> compile. I
> >>>>> have given the library path but the problem persists.
> >>>>>
> >>>>> g++ -I /home/simon/Softs/gromacs-5.1/opt GlyRot.cpp -o GlyRot.o -Wall
> >> -c
> >>>> -I /home/simon/Softs/gromacs-5.1/opt/include
> >>>>
> >>>>> GlyRot.cpp:8:10: fatal error: gromacs/commandline.h: No such file or
> >>>>> directory
> >>>>> #include "gromacs/commandline.h"
> >>>>> ^~~~~~~~~~~~~~~~~~~~~~~
> >>>>> compilation terminated.
> >>>>>
> >>>>> I understand it is a simple compile error. Still it would be great to
> >>>> know
> >>>>> the answer here. Thanks in advance.
> >>>>>
> >>>>> Simon
> >>>>>
> >>>> --
> >>>> David van der Spoel, Ph.D., Professor of Biology
> >>>> Head of Department, Cell & Molecular Biology, Uppsala University.
> >>>> Box 596, SE-75124 Uppsala, Sweden. Phone: +46184714205.
> >>>> http://www.icm.uu.se
> >>>> --
> >>>> Gromacs Users mailing list
> >>>>
> >>>> * Please search the archive at
> >>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >>>> posting!
> >>>>
> >>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >>>>
> >>>> * For (un)subscribe requests visit
> >>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> >>>> send a mail to gmx-users-request at gromacs.org.
> >>>> --
> >>>> Gromacs Users mailing list
> >>>>
> >>>> * Please search the archive at
> >>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >>>> posting!
> >>>>
> >>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >>>>
> >>>> * For (un)subscribe requests visit
> >>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> >>>> send a mail to gmx-users-request at gromacs.org.
> >>>>
> >> --
> >> ==================================================
> >>
> >> Justin A. Lemkul, Ph.D.
> >> Assistant Professor
> >> Office: 301 Fralin Hall
> >> Lab: 303 Engel Hall
> >>
> >> Virginia Tech Department of Biochemistry
> >> 340 West Campus Dr.
> >> Blacksburg, VA 24061
> >>
> >> jalemkul at vt.edu | (540) 231-3129
> >> http://www.thelemkullab.com
> >>
> >> ==================================================
> >>
> >> --
> >> Gromacs Users mailing list
> >>
> >> * Please search the archive at
> >> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> >> posting!
> >>
> >> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> >>
> >> * For (un)subscribe requests visit
> >> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> >> send a mail to gmx-users-request at gromacs.org.
> >>
>
> --
> ==================================================
>
> Justin A. Lemkul, Ph.D.
> Assistant Professor
> Office: 301 Fralin Hall
> Lab: 303 Engel Hall
>
> Virginia Tech Department of Biochemistry
> 340 West Campus Dr.
> Blacksburg, VA 24061
>
> jalemkul at vt.edu | (540) 231-3129
> http://www.thelemkullab.com
>
> ==================================================
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>
More information about the gromacs.org_gmx-users
mailing list