Take the 2-minute tour ×

I am using Intel Visual Fortran Composer XE 2011 to build my Fortran project in MS Visual Studio 2008. I am getting linker errors: LNK2019 unresolved external symbol.

I did a dumpbin on my obj files and all of my symbols (under CVF calling convention) are exporting as _symbol1, _symbol2, _symbol3, and so on EXCEPT for three random ones that have some stuff prefixed to it.

For example: _imp_symbol4, _imp_symbol5, _imp_symbol6

At first I suspected my calling convention must have been the problem but if it was my calling convention, wouldn't ALL of the other symbols have exported with the imp prefixed to it as well? It's so random that three of them export weirdly and I don't quite understand what is going on. Any help would be appreciated.

share|improve this question
Does the error message tell you which symbols are the problem? If so, are those three the symbols that you are getting the linker error message for? Where are the routines that you are trying to link to? In the same or different source file? In a library? How are you telling Fortran about them? Are they in a module that you are "using"? –  M. S. B. Sep 26 '12 at 23:24
yes it tells me which symbols are the problem and those symbols are the ones giving me the linker errors. The functions being used in my project are being called from a static lib which I have set the dependencies already. And they are all in the same source file. –  user1496542 Sep 27 '12 at 12:13

2 Answers 2

The entities corresponding to those symbols may have the DLLIMPORT attribute. The link step may be missing the relevant import library.

share|improve this answer
The problem is I have linked in the correct library. It is just a simple static lib. The other functions I used in my project from the same static lib linked fine (without the extra imp at the front which is why I'm puzzled) –  user1496542 Sep 27 '12 at 12:14
up vote 0 down vote accepted

I found out the issue was because I had some DLL export statements for those symbols when I really didn't need them. It made the compiler expect _imp_sybmol because I was exporting them using the statement:


I just removed them and the linker errors went away.

share|improve this answer

Your Answer


