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

Benjamin Bouvier bbouvie at gwdg.de
Wed Aug 24 17:48:35 CEST 2005


David van der Spoel wrote:
> 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.
> 

Many thanks David, problem solved !
Cheers,

   Ben.

> 
>>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!
>>
>>


-- 
Dr. Benjamin BOUVIER
--------------------
Theoretical and Computational Biophysics Department
Max-Planck-Institut für biophysikalische Chemie
Am Fassberg 11
D-37077 Göttingen, Germany
Tel:      +49/551/201-2320
Fax:      +49/551/201-2302
email:    benjamin.bouvier[at-no-spam]mpi-bpc.mpg.de
homepage: http://www.mpibpc.mpg.de/abteilungen/070/bbouvie/index.htm



More information about the gromacs.org_gmx-developers mailing list