Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28463 Discussions

Link NetCDF Fortran library to Visual Studio 2008 / Intel Composer XE 2013

Jose_M_
Beginner
1,878 Views

Dear all,

I am trying to create NetCDF files in Fortran using VS2008 and Intel Composer XE 2013 as compiler.

I tried with different pre-built libraries that I found on the web, and I managed to link the libraries to the program, so now I can compile the program without errors. The problem is that the program doesn't recognizes the commands of the library, so it doesn't work at all...

Any idea about how to fix it?

Thanks,

Jose

0 Kudos
1 Solution
mecej4
Honored Contributor III
1,843 Views

I think that the build process for the Fortran library for NetCDF is rather delicate, and likely to fail if all the dependencies do not form a compatible set. I downloaded netcdf-fortran-4.4.0.tar.gz and tried to build the Fortran library. The only combination that worked was from using Intel 14.0.4.237 (not the current version)  and cmake -G "NMake Makefiles". Even that failed at the link step with unresolved _nc_create_par_fortran, _nc_open_par_fortran, _nc_var_par_access, _ncerr and  _ncopts. I built the DLL by supplying dummy C code for those routines, and could build some of the Fortran examples using the DLL and the import library. I could also build the example in #6 after I added a main program that simply called the subroutine.

For what it is worth, I have attached the DLL, LIB and MOD files. Before using the files, please run a virus check on them, for your protection.

 

View solution in original post

0 Kudos
22 Replies
Jose_M_
Beginner
209 Views

Yeah! Thanks for persisting! As I said, I am new in Fortran and it was becoming frustrating, but it was a pity not to use the library! I am sure I'm not the only one that will use it!

0 Kudos
victor_pp
Novice
209 Views

Dear mecej4,

the NetCDFF library you built works fine in 32-bit projects for me. But now I need to switch to x64 configuration due to memory limitations. Would it be possible to get the x64 version of the library?

Thank you  in advance,

Victor

0 Kudos
Reply