[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netCDF libraries cont.



>To: <address@hidden>
>From: "Guy Gersbach" <address@hidden>
>Subject: Precompiled Windows NetCDF Libraries
>Organization: DAL Science & Engineering Pty Ltd
>Keywords: 200202150443.g1F4hHx06521

Hi Guy,

> Thankyou for your help thus far.  The code now compiles with the netCDF
> calls.
> 
> However I've still got a few problems with the netCDF library.  My
> program is crashes as it calls the first netCDF routine.  Exerpt from
> the code is,
> 
>         CDFID = NCCRE('efdc.cdf',NCCLOB,IRET)
> 
> Values passed to NCCLOB, and IRET are 0, 0
> 
> The code was compiled successfully against the netcdf.lib (dynamic
> library).  I'm runnning WindowsXP.  When the program crashes the
> following error report is generated.
> 
> Faulting application efdc.exe, version 0.0.0.0, faulting module
> netcdf.dll, version 0.0.0.0, fault address 0x0001caa2. (from the event
> viewer report). 
> 
> Do you have any ideas why its crashing here?  Is the netcdf.dll
> appopriate for WindowsXP Professional?  Is there a way around this.

Sorry, we don't run Windows XP here and don't have the Absoft
compilers you are using, so we can't duplicate the problem.  I'm
CC:ing another developer, John Caron, who runs Windows and provided
the Windows support we make available, in case he can help.

> I have also tried linking against the static library (netcdfs.lib)
> however I can't link to that library as I get the following error
> message which indicate an issue with the c library.
> 
> > # link error: undefined symbol - __iob
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/v2i.obj)
> > # link error: undefined symbol - __chkstk
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/v2i.obj)
> > # link error: undefined symbol - __pctype
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/string.obj)
> > # link error: undefined symbol - __isctype
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/string.obj)
> > # link error: undefined symbol - ___mb_cur_max
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/string.obj)
> > # link error: undefined symbol - __ftol
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/ncx.obj)
> > # link error: undefined symbol - _close
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - __errno
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - _open
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - _write
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - _lseek
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - _fstat
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - _read
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > # link error: undefined symbol - _unlink
> > #   first ref in - ..\..\..\..\PROGRAM
> > FILES\ABSOFT70\LIB\NETCDFS.LIB(../libsrc/posixio.obj)
> > Make:
> > *** Error code 14
> > Build failed
> >
>  
>  I also emailed Absoft who came back with the following advice and
> questions with respect to the static and dynamic libraries.   
> 
> It may be easier during development to link against the static library.

That sounds like good advice.  And since you are using different
compilers than we are, you should generate the library with your
compilers.

> The unresolved references look like C library routines. But whose C
> library? Probably Microsoft's. It's interesting that they are not needed
> for the DLL? Another question for the netCDF 
> folks.

If you got the netcdfs.lib static library from us, then that would
have been generated with the Microsoft compiler.

> Can you more completely describe: "is hanging when it reaches the first 
> call to the netCDF library (NCCRE)". Do you mean it enters and does not
> return? Can you send me a description of the function and its arguments?

You would have that information.  Maybe you could put together a small
example that fails and send that to the Absoft folks.

> Is there anything you could pass on to them to make things clearer? 

Sorry, but I don't think so.  We make all our sources and tests
available, so they should be able use their compiler on our sources,
run the tests we provide, and debug the problem.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu