Re: [netcdf-porting] Native 64-Bit-DLL for Windows

NOTE: The netcdf-porting mailing list is no longer active. The list archives are made available for historical reasons.

"a.rost@xxxxxxxxxxx" <a.rost@xxxxxxxxxxx> writes:

Hi Ed,

thanks for replying so fast!
The solution you proposed works fine as long as you just need the
C-Interface.
But I'm looking for a way to build both - the C and the Fortran77
interface in one DLL which didn't work inside the Visual Studio.


It will work from visual studio if you find the correct pre-processor
setting for your fortran.

The way netCDF supports fortran is by building a bunch of C functions
with mangled names, such that when you call the thing from fortran,
the name gets mangled in the same way and you get the C function in
the DLL.

But since every fortran compiler can mangle things in different ways,
the netCDF build has to know what fortran compiler you intend to
use. You set this as a preprocessor flag in visual studio before
building the C library.

I forget which pre-processor symbol is currently being used in the
visual studio solution file, but if it doesn't work for your fortran
compiler, you can try to see flags pgiFortran or f2cFortran and try
again.

Good luck...

Ed

--
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx


  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-porting archives: