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

Re: udunits and Windows



David,

I'm afraid I don't "do Windows" :-)  but I'm fairly sure we can stumble
our way through the build process together.

As an alternative, I'll see if I can get a Windows developer here to
build the package so that you can get it.  I don't know which way will
be faster.

The first thing to do is to create most of the UDUNITS library.  Go into
the "src/lib" subdirectory and compile the files utparse.c, utscan.c,
and udalloc.c with a C compiler.  Then, create a library using the
resulting object files (sorry, I don't know the commands to do this).

Next, the file utlib.c must be compiled and added to the library.  It
must, however, be compiled in a way that allows Fortran routines to call
the C functions that define the Fortran interface.  This is done by
defining a specific C macro that says what Fortran compiler will be used
to compile the Fortran code.  Can you find your Fortran compiler amongst
the following C macros?

    NAGf90Fortran
    f2cFortran
    hpuxFortran
    apolloFortran
    sunFortran
    IBMR2Fortran
    CRAYFortran
    pgiFortran
    mipsFortran
    DECFortran
    vmsFortran
    CONVEXFortran
    PowerStationFortran
    AbsoftUNIXFortran
    AbsoftProFortran
    SXFortran

The macro "pgiFortran" should also be used for the Intel Fortran
compiler.

Once you know the macro, compile the file utlib.c with that macro
defined and then add the resulting object file to the library.

Assuming you get this far, then you can install the library in an
appropriate directory and you're done.

Please tell me how this goes.

Regards,
Steve Emmerson
UDUNITS Developer

------- Original Message

Date:    Mon, 13 Feb 2006 10:21:09 +1300
From:    David Rupp <address@hidden>
To:      address@hidden
Subject: udunits and Windows

Dear all,

I am attempting to compile and link a FORTRAN90 program in WindowsXP 
(originally written on linux) that uses the netCDF and UDUNITS 
libraries.   I have downloaded the prebuilt  libraries for netCDF from 
unidata and seem to have successfully linked to them.  There are no 
prebuilt UDUNITS libraries available, however, and I don't know how to 
build them.

If anyone has previously been through these steps, I would very much 
appreciate you wisdom.

Cheers,
David

----------------------
David E. Rupp, Ph.D.
Research Scientist
NIWA
P.O. Box 8602
Christchurch 8004
New Zealand
Phone: +64 3 343 8031
Fax: +64 3 348 5548
address@hidden

------- End of Original Message