- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Linking an Intel Fortran V7/Win32 program to the unidata pre-compiled netcdf.dll library (DVF I think) produces unsatisfied externals. Has anyone accomplished this and, if so, what are the steps involved? Is a new build from source necessary or some combination of compiler switches? Thanks for any help.
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One doesn't link to a DLL - you link to an import library. What are the unsatisfied externals?
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, of course I meant to say linking to netcdf.lib. Following is the Buildlog.txt relevant output:
Linking...
Link /OUT:"Debug/GMI Stratosphere.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/GMI Stratosphere.pdb" /SUBSYSTEM:CONSOLE netcdf.lib Debug/dlsode.obj Debug/drvr_day.obj Debug/drvr_dlsode.obj Debug/drvr_init.obj Debug/drvr_lookup.obj Debug/drvr_volvo.obj Debug/lookup.obj Debug/ ead_gmi.obj Debug/ ead_ncdf.obj Debug/setkin_kcalc.obj Debug/setkin_lchem.obj Debug/setkin_spcdot.obj Debug/solrpos.obj Debug/write_ncdf.obj
Link: executing 'link'
lookup.obj : error LNK2019: unresolved external symbol _NF_OPEN referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_OPEN
read_ncdf.obj : error LNK2001: unresolved external symbol _NF_OPEN
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_OPEN referenced in function _CREATE_NC_OUTPUT
lookup.obj : error LNK2019: unresolved external symbol _NF_INQ_VARID referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_INQ_VARID
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_INQ_VARID referenced in function _READ_LOTUS_INPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_INQ_VARID referenced in function _CREATE_NC_OUTPUT
lookup.obj : error LNK2019: unresolved external symbol _NF_GET_VAR_REAL referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_GET_VAR_REAL
lookup.obj : error LNK2019: unresolved external symbol _NF_CLOSE referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_CLOSE
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_CLOSE referenced in function _READ_LOTUS_INPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_CLOSE referenced in function _CREATE_NC_OUTPUT
read_gmi.obj : error LNK2019: unresolved external symbol _NF_GET_VAR1_REAL referenced in function _READ_GMI_INPUT
read_gmi.obj : error LNK2019: unresolved external symbol _NF_INQ_DIMID referenced in function _READ_GMI_INPUT._FV_COLUMN
read_ncdf.obj : error LNK2001: unresolved external symbol _NF_INQ_DIMID
read_gmi.obj : error LNK2019: unresolved external symbol _NF_INQ_DIMLEN referenced in function _READ_GMI_INPUT._FV_COLUMN
read_ncdf.obj : error LNK2001: unresolved external symbol _NF_INQ_DIMLEN
read_gmi.obj : error LNK2019: unresolved external symbol _NF_GET_VAR1_INT referenced in function _READ_GMI_INPUT._FV_COLUMN
read_gmi.obj : error LNK2019: unresolved external symbol _NF_GET_VARA_REAL referenced in function _READ_GMI_INPUT._FV_COLUMN
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_GET_VAR_DOUBLE referenced in function _READ_LOTUS_INPUT
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_GET_VAR1_DOUBLE referenced in function _READ_LOTUS_INPUT
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_GET_VARA_DOUBLE referenced in function _READ_LOTUS_INPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCCRE referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _ABORT referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCDDEF referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCVDEF referenced in function _C REATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCAPTC referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCENDF referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCVPT referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_PUT_VAR_REAL referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCVPTC referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_PUT_VAR1_REAL referenced in function _WRITE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_PUT_VARA_REAL referenced in function _WRITE_NC_OUTPUT
Debug/GMI Stratosphere.exe : fatal error LNK1120: 23 unresolved externals
Linking...
Link /OUT:"Debug/GMI Stratosphere.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/GMI Stratosphere.pdb" /SUBSYSTEM:CONSOLE netcdf.lib Debug/dlsode.obj Debug/drvr_day.obj Debug/drvr_dlsode.obj Debug/drvr_init.obj Debug/drvr_lookup.obj Debug/drvr_volvo.obj Debug/lookup.obj Debug/ ead_gmi.obj Debug/ ead_ncdf.obj Debug/setkin_kcalc.obj Debug/setkin_lchem.obj Debug/setkin_spcdot.obj Debug/solrpos.obj Debug/write_ncdf.obj
Link: executing 'link'
lookup.obj : error LNK2019: unresolved external symbol _NF_OPEN referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_OPEN
read_ncdf.obj : error LNK2001: unresolved external symbol _NF_OPEN
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_OPEN referenced in function _CREATE_NC_OUTPUT
lookup.obj : error LNK2019: unresolved external symbol _NF_INQ_VARID referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_INQ_VARID
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_INQ_VARID referenced in function _READ_LOTUS_INPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_INQ_VARID referenced in function _CREATE_NC_OUTPUT
lookup.obj : error LNK2019: unresolved external symbol _NF_GET_VAR_REAL referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_GET_VAR_REAL
lookup.obj : error LNK2019: unresolved external symbol _NF_CLOSE referenced in function _READ_LOOKUP
read_gmi.obj : error LNK2001: unresolved external symbol _NF_CLOSE
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_CLOSE referenced in function _READ_LOTUS_INPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_CLOSE referenced in function _CREATE_NC_OUTPUT
read_gmi.obj : error LNK2019: unresolved external symbol _NF_GET_VAR1_REAL referenced in function _READ_GMI_INPUT
read_gmi.obj : error LNK2019: unresolved external symbol _NF_INQ_DIMID referenced in function _READ_GMI_INPUT._FV_COLUMN
read_ncdf.obj : error LNK2001: unresolved external symbol _NF_INQ_DIMID
read_gmi.obj : error LNK2019: unresolved external symbol _NF_INQ_DIMLEN referenced in function _READ_GMI_INPUT._FV_COLUMN
read_ncdf.obj : error LNK2001: unresolved external symbol _NF_INQ_DIMLEN
read_gmi.obj : error LNK2019: unresolved external symbol _NF_GET_VAR1_INT referenced in function _READ_GMI_INPUT._FV_COLUMN
read_gmi.obj : error LNK2019: unresolved external symbol _NF_GET_VARA_REAL referenced in function _READ_GMI_INPUT._FV_COLUMN
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_GET_VAR_DOUBLE referenced in function _READ_LOTUS_INPUT
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_GET_VAR1_DOUBLE referenced in function _READ_LOTUS_INPUT
read_ncdf.obj : error LNK2019: unresolved external symbol _NF_GET_VARA_DOUBLE referenced in function _READ_LOTUS_INPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCCRE referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _ABORT referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCDDEF referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCVDEF referenced in function _C REATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCAPTC referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCENDF referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCVPT referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_PUT_VAR_REAL referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NCVPTC referenced in function _CREATE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_PUT_VAR1_REAL referenced in function _WRITE_NC_OUTPUT
write_ncdf.obj : error LNK2019: unresolved external symbol _NF_PUT_VARA_REAL referenced in function _WRITE_NC_OUTPUT
Debug/GMI Stratosphere.exe : fatal error LNK1120: 23 unresolved externals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I don't have the answer to your link problem, but I'm curious as to how useful you would find it if the Array Visualizer supported netCDF. That would allow you to view files using the Array Viewer and also write fortran code such as:
Would you need read/write access or is just read sufficient?
John
I don't have the answer to your link problem, but I'm curious as to how useful you would find it if the Array Visualizer supported netCDF. That would allow you to view files using the Array Viewer and also write fortran code such as:
! Open the file call avOpen("myfile.cdf", 0, status) ! Get extent of first dimension call avGetExtent("/mydata", 1, nExtent) ! Allocate memory for the array allocate(myarray(nExtent)) ! Read values to the array call avReadArray(LOC(myarray), "/mydata", status)
Would you need read/write access or is just read sufficient?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On continuing investigation and with help from Intel support, it looks like /Gm solves some or all of the linking problem. I guess it might be better to rebuild the netcdf.dll using the Intel Fortran compiler, but exactly how to do that is still confusing to me, since info on the Unidata site is directed only toward prior versions of compilers and IDEs.
It does appear that, even with /Gm, netcdf calls made exclusively within CONTAINS blocks do not resolve on linking. Calls made earlier in the main subprogram do resolve.
It does appear that, even with /Gm, netcdf calls made exclusively within CONTAINS blocks do not resolve on linking. Calls made earlier in the main subprogram do resolve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the response. We tend to use visualization tools developed specifically for our applications (climate/atmospheric chemistry) wrt simulation model output produced on large parallel platforms and visualized locally. I don't think, at first glance, that Array Visualizer support of netCDF would benefit us that much.
My linking question here concerns models compiled and run on my PC/workstation. I used DEC's Array Visualizer more in debugging codes than output analysis.
My linking question here concerns models compiled and run on my PC/workstation. I used DEC's Array Visualizer more in debugging codes than output analysis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for the input.
BTW, We're planning on Intel Fortran to support using AV in debugging for v8.0.
John
BTW, We're planning on Intel Fortran to support using AV in debugging for v8.0.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
I would like to implement netCFD in my Fortran programs that I am constructing with Compac Visual Fortran on my Windows XP machine. The netCDF website does not provide instructions for Windows XP. I noticed that you participated in a series of exchanges regarding netCDF last year. Would you have information, or be able to direct me to someone with information, on how I might get netCDF up and running on my system? You help would be greatly appreciated!
Regards,
Elizabeth
I would like to implement netCFD in my Fortran programs that I am constructing with Compac Visual Fortran on my Windows XP machine. The netCDF website does not provide instructions for Windows XP. I noticed that you participated in a series of exchanges regarding netCDF last year. Would you have information, or be able to direct me to someone with information, on how I might get netCDF up and running on my system? You help would be greatly appreciated!
Regards,
Elizabeth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Elizabeth,
I'm not specifically familiar with netcdf. John is and he may comment. Windows XP shouldn't be different from any other Windows.
I'm not specifically familiar with netcdf. John is and he may comment. Windows XP shouldn't be different from any other Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've implemented netCDF support in AV for the upcoming IVF release, but didn't come across any unusual issues building under Windows XP.
John

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page