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.
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:
!DEC$ATTRIBUTES STDCALL:: YOURSYMBOL
!DEC$ATTRIBUTES DLLEXPORT:: YOURSYMBOL
I just removed them and the linker errors went away.