[gmx-developers] Circular dependencies makes linker a dull boy

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Thu Nov 5 15:26:21 CET 2009


On Thu, Nov 5, 2009 at 6:21 AM, Erik Marklund <erikm at xray.bmc.uu.se> wrote:
> Hi,
>
> I, along with a few colleagues, am adding a few files to src/kernel/ as part
> of the implementation of qhop. I do get linker issues though, since force.c
> in src/mdlib/ uses a few functions found in src/kernel/qhop.c. In the end,
> this makes the kernel library dependent on the mdlib and vice versa. Moving
> qhop.c to mdlib does not resolve this issue, as it too needs stuff from
> kernel. How can I resolve this? Do I need to shuffle around more files,
> force.c for instance?

erik,
are you sure that the function that you need from multiple places is
properly prototyped and declared as "external"?

cheers,
    axel.


>
> Here's the error:
>> /home/erikm/source/GMX/qhop_git/gromacs/src/mdlib/force.c:1613: undefined
> reference to `mk_qhoprec'
> collect2: ld returned 1 exit status
>>
> Cheers,
>
> --
> -----------------------------------------------
> Erik Marklund, PhD student
> Laboratory of Molecular Biophysics,
> Dept. of Cell and Molecular Biology, Uppsala University.
> Husargatan 3, Box 596,    75124 Uppsala, Sweden
> phone:    +46 18 471 4537        fax: +46 18 511 755
> erikm at xray.bmc.uu.se    http://xray.bmc.uu.se/molbiophys
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the www interface
> or send it to gmx-developers-request at gromacs.org.
>



-- 
Dr. Axel Kohlmeyer    akohlmey at gmail.com
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.



More information about the gromacs.org_gmx-developers mailing list