How to link dll in a VS 2008 project?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • odnustuk
    New Member
    • Mar 2011
    • 2

    How to link dll in a VS 2008 project?

    Hi!

    I am making a project in Visual Studio 2008 with making use of integrated Intel Fortran Compiler (ver. 11.1). The program is written in Fortran and uses netCDF for writing results of its calculations.

    When I worked with this program using old Compaq Visual Fortran, there were no problems niether with the code nor with netCDF (only 3 files related to netcdf were used: netcdf.fi, netcdf.dll and netcdf.lib). But now, when I rebuilt it in VS 2008, an error occured related to netCDF (as I suggest...). The error text is as follows:

    1>Linking...
    1>pom2k_CDF.ob j : error LNK2019: unresolved external symbol _NF_STRERROR referenced in function _HANDLE_NETCDF_ ERROR
    1>pom2k_CDF.ob j : error LNK2019: unresolved external symbol _NF_DEF_VAR referenced in function _DEF_VAR_NETCDF

    and so on (10 errors of this type).

    What can be wrong with it? The compiling stage is OK, but on the stage of linking (as shown above) these errors occur...


    PS: all project files are *.f (fortran fixed format), also the header netcdf.fi is included in the project and netcdf.dll is put in the project directory. But the errors remain...

    Thanks in advance!
  • odnustuk
    New Member
    • Mar 2011
    • 2

    #2
    I've solved the problem. Looks like it was caused by the error of the VS integrated linker. For some reason it did not take the set parameters, therefore it could not link necessary files. Rebuilding the project with setting corresponding parameters solved the problem.

    Comment

    • bohluly
      New Member
      • Jan 2013
      • 1

      #3
      Can I have a copy of your VS project

      I need using netCDF in Intel FORTRAN project, If it is possible please send your project or sample of your project for me.
      It will help me a lot!
      My email is
      Sincerely yours.
      Last edited by PsychoCoder; Jan 8 '13, 03:01 AM. Reason: Email removed as per board rules

      Comment

      Working...