This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Tom, >Date: Tue, 04 Mar 97 15:03:17 EST >From: <address@hidden> (Tom Stepka) >Organization: NOAA >To: address@hidden >Subject: Re: 970227: NetCDF 2.4.3 under Windows NT 4.0 >Keywords: 199702271645.JAA09682 In the above message, you wrote: > I'm a real novice at shell programming and trying to figure out the > configure script's elliptical way of forming commands makes my head > spin! The `configure' script is auto-generated by the autoconf(1) utility. I'm not surprised that it gives headaches. > Nonetheless, I have been able to correct the "preprocessor > doesn't work" failure. by putting in a ton of echo commands. When > the Microsoft compiler is invoked it writes its trademark and logo > to config.out, then lists the files it is compiling, then any errors > or warnings. Even a clean compile puts enough text into config.out > so that the subsequent ac_err=`grep... command finds a match and > configure interprets it as a compile error. After verifying a clean > compile I forced ac_err="" and configure was happy. There should be a compiler option to disable its banner output. You should add this to the CC variable. > I have not been able to figure out the "cross compiling" error, mostly > because I cannot figure out what command configure is execution to > compile the test file. An echo command just before prints ac_ext="c", > CFLAGS= "-O", ac_compile="${CC-cc} -c $CFLAGS conftest.$ac_ext 1>&5", > and CPPFLAGS="/EP". "-O" is a valid Microsoft compiler option; it > optimizes code. I can peel off the test code and put it in its own > file and it compiles with -O fine. Can you figure out what compiler > command is being generated. Not without access to a similar system. Try the following: 1. Go to the top-level source directory. 2. Execute `make distclean'. 3. Set the variable CC to `CL' plus whatever option disables banner output. 4. Set the variable CPP to `CL /EP' plus whatever option disables banner output. 5. Execute the `configure script'. Trap standard output and send it to me. 6. Send me the file `config.log'. > Thanks for your help, > Tom > > PS Some test code has #include "Confdefs.h" Cannot find this file > anywhere. Am getting by with an empty file for now. Is anything > significant supposed to be in there? Yes. `confdefs.h' accumulates all the C macro definitions that the `configure' script decides are needed. -------- Steve Emmerson <address@hidden>