[gmx-developers] compiling home-made GMX code under Cygwin

David van der Spoel spoel at xray.bmc.uu.se
Wed Aug 24 17:00:57 CEST 2005


On Wed, 2005-08-24 at 15:08 +0200, Benjamin Bouvier wrote:
> Hi all,
> 
> I'm trying to compile a home-made program, which uses gromacs headers & 
> libraries (v. 3.2.1), under Cygwin/WinXP (gcc 3.4.4) on my laptop. The 
> code is in C++. It compiles and links fine under Linux (gcc 3.3.3, GMX 
> v. 3.2.1).
turn off motif in gromacs.

> 
> I've compiled FFTW and GMX with no problems under Cygwin. Everything 
> seems to work.
> The template application provided in the share/template dir of the GMX 
> distro compiles and links fine using the provided Makefile. However, it 
> issues the warnings:
> 
> Info: resolving __XmStrings by linking to __imp___XmStrings (auto-import)
> Info: resolving _xmSeparatorWidgetClass by linking to 
> __imp__xmSeparatorWidgetClass (auto-import)
> Info: resolving _XtStrings by linking to __imp__XtStrings (auto-import)
> Info: resolving _applicationShellWidgetClass by linking to 
> __imp__applicationShellWidgetClass (auto-import)
> Info: resolving _xmPushButtonWidgetClass by linking to 
> __imp__xmPushButtonWidgetClass (auto-import)
> Info: resolving _xmTextFieldWidgetClass by linking to 
> __imp__xmTextFieldWidgetClass (auto-import)
> Info: resolving _xmToggleButtonWidgetClass by linking to 
> __imp__xmToggleButtonWidgetClass (auto-import)
> Info: resolving _xmLabelWidgetClass by linking to 
> __imp__xmLabelWidgetClass (auto-import)
> 
> Now when I compile my own code, even though the makefile is very similar 
> to that of the template (c++ is used instead of cc for compilation and 
> linkage, but that works great under Linux), I get linker errors such as:
> 
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x14e): 
> undefined reference to `__XmStrings'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x159): 
> undefined reference to `__XmStrings'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x15e): 
> undefined reference to `__XmStrings'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x193): 
> undefined reference to `_XtSetValues'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x19b): 
> undefined reference to `_XmStringFree'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x1ad): 
> undefined reference to `_XtManageChild'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x207): 
> undefined reference to `_XtUnmanageChild'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x262): 
> undefined reference to `_XtUnmanageChild'
> /usr/local/gromacs/i686-pc-cygwin/lib/libgmx.a(mgmx.o):mgmx.c:(.text+0x2b4): 
> undefined reference to `__XmStrings'
> and many more...
> 
> I know that Cygwin has a special way of dealing with libraries 
> (so-called auto-import). But why auto-import works in the first case and 
> not in the second is a mystery to me. Adding --enable-auto-import to the 
> linker options does not help (this should be the default behavior anyway).
> 
> Any clue would be welcome, thanks!
> 
> 
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
spoel at xray.bmc.uu.se    spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





More information about the gromacs.org_gmx-developers mailing list