I am using Intel compilers on Windows through the cygwin environment. I am trying to link a library with my applicationbut while linking, I am getting unresolved external symbol errors similar to the following:
io_ncmpi_def_dims.o : error LNK2019: unresolved external symbol ncmpi_def_dim referenced in function io_ncmpi_def_dims_
There are 28 such unresolved external symbols. When I checked in the io_ncmpi_def_dim.o file for the symbol using : $ dumpbin.exe /SYMBOLS io_ncmpi_def_dim.o
Yes, there are flags to control underscores; they are well documented.
The two outputs from DUMPBIN that you showed both show unsatisfied references, one with an underscore and one without.
The question remains as to where the symbol is actually defined, and what decoration is used there. It is going to be a bit harder for you to make them all work together if you have an external reference and a definition in objects or libraries for which you have no source and they have different decorations as noted above. If you have sources for everything, all you have to do is to make sure that they are consistent as to names and compile all the sources with the appropriate underscore convention.