- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to build a Fortran console application that I have just built successfully with CVF6.6. The application uses2 static libraries. Ihave built one of these myself with both CVF6.6 and IVF9.1. The second is a library I didnot build myself, but that I used succesfully when building exactly the same application with CVF6.6. The IVF9.1build fails at the linker stage with many LNK2019 error messages (unresolved external symbols). These refer to variables in the libraries. The full pathe for the librariies has been specifiedunder the Project linker properties and in the more general tools/options, and the .mod filesfor the library that I built myself resides in an include directory that is also specified under project resources properties. But the linker does not seem to recognize them.
I have tried rebuilding the application with all the possible options listed under Project -> Properties -> Fortran -> External procedures -> Calling convention : default; C, REFERENCE; STDCALL, REFERENCE; STDCALL; CVF -- but without any success (I still get all the same LNK2019 errors).
I have had some success by explicitly listing the static libraries (with their full path) under Project -> Properties -> Linker -> Input -> Additional dependencies : libcwrcommon.lib netcdf.lib -- in addition to having the directory that contains them specified both at the tools/options level and under project resources properties, as previously. As noted above, I have built the libcwrcommon library myself, so I have all the .mod and .obj files for the library, and these are in an "include" subdirectory (which is declared under Project -> Properties -> Resources -> Additional Include Directories). However I have not built the netcdf.lib library myself so I do not have the .mod and .obj files for this library. I am using the same netcdf.lib library that I used for the successful CVF build of exactly the same application. With this change (i.e., specifying Project -> Properties -> Linker -> Input -> Additional dependencies : libcwrcommon.lib netcdf.lib), all the linker errors that arise now refer only to unresolved external symbols from the netcdf library.
Any suggestions would be most welcome.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be helpful to see a sample of the error messages to get an idea in which area the problem lies. My guess is that you have mismatched calling conventions, but without some details, it's hard to say.
I assume that this netcdf library is written in C, as if it is written in Fortran, you will need a new version to use with Intel Fortran.
The linker does not care about .mod files - those are for the compiler only. The linker looks at .lib and .obj files.
The first thing you need to do is determine if the names being looked for are in the library in question. Open a Fortran Build Environment console window (Start..Programs..Intel Software Development Tools..Intel Fortran Compiler 9.1..Build Environment for IA-32 Applications.) "cd" to the folder containing the .lib you think has the symbols in question and type this command:
dumpbin -symbols libraryname.lib > dump.txt
Now "notepad dump.txt" and search it for the name in question. It must match exactly, including use of upper and lower case and the presence (or absence) of @n at the end. What did you find?

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