we compiled our fortran code with CVF6.0,now we want to develop a 64bit program,so we have to use Intel VF9.0 to compile our Fortran code.We compile our project which have Fortran code and C++ code with "nmake" in command line.But we got this error when it was linking:
libirc.lib:error LNK2019: unresolved external symbol _iob referenced in function __intel_alloc_bpv
if I add "/nodefaultlib:"libirc.lib" " into my makefile,I got another error:
myproject.obj : error LNK2019: unresolved external symbol __intel_alloc_bpv referenced in function MYFUN
myproject.obj : error LNK2019: unresolved external symbol __intel_free_bpv referenced in function MYFUN
I think this error was caused by the code "FORMAT(A,X,I7,'P',I7)" in MYFUN.
How can I fix it?
libirc.lib
if I add "/nodefaultlib:"libirc.lib" " into my makefile,I got another error:
myproject.obj : error LNK2019: unresolved external symbol __intel_alloc_bpv referenced in function MYFUN
myproject.obj : error LNK2019: unresolved external symbol __intel_free_bpv referenced in function MYFUN
I think this error was caused by the code "FORMAT(A
How can I fix it?
連結已複製
8 回應
I give :
"F90=E:IFORT.exe
F90_PROJ=/browser:"Debug64/" /compile_only /debug:full /fpscomp:ioformat /include:"$(INTDIR)" /include:"Debug/" /include:"....includecom" /libs:dll /math_library:fast /nologo /reentrancy:threaded /traceback /warn:argument_checking /warn:nofileopt /module:"Debug64/" /object:"Debug64/" /pdbfile:"Debug64/DF60.PDB"
F90_OBJS=.Debug64/"
F90_PROJ=/browser:"Debug64/" /compile_only /debug:full /fpscomp:ioformat /include:"$(INTDIR)" /include:"Debug/" /include:"....includecom" /libs:dll /math_library:fast /nologo /reentrancy:threaded /traceback /warn:argument_checking /warn:nofileopt /module:"Debug64/" /object:"Debug64/" /pdbfile:"Debug64/DF60.PDB"
F90_OBJS=.Debug64/"
in my makefile.
LINK32=link.exe
LINK32_FLAGS=htmlhelp.lib liblssecurity_mtdll.lib opengl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib glu32.lib netapi32.lib ws2_32.lib bufferoverflowu.lib /stack:0x989680 /subsystem:console /profile /debug /machine:IX86 /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"libcd.lib" /out:"myproject.exe" /libpath:"..lib" /libpath:"../../lib64" /machine:AMD64
LINK32_FLAGS=htmlhelp.lib liblssecurity_mtdll.lib opengl32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib glu32.lib netapi32.lib ws2_32.lib bufferoverflowu.lib /stack:0x989680 /subsystem:console /profile /debug /machine:IX86 /nodefaultlib:"libcmt.lib" /nodefaultlib:"msvcrt.lib" /nodefaultlib:"libcd.lib" /out:"myproject.exe" /libpath:"..lib" /libpath:"../../lib64" /machine:AMD64
I am always suspicious of uses of /nodefaultlib. They cause more problems than they solve. Usually attempts to work around linking problems with /nodefaultlib are better addressed by specifying the proper library switch to the compilations.
I suspect that in your case you have a lot of non-Fortran libraries which require linking against specific versions of MSVC libraries. I am not familiar with all of them, so the only advice I can offer now is to go back to the beginning and make sure that all sources are compiled with compatible settings for which run-time libraries are to be used.
Also, make sure that you have run ifortvars.bat to start your command session that runs the makefile. This is done automatically when you use the "Build Environment" shortcut in the Intel Visual Fortran program group.
I suspect that in your case you have a lot of non-Fortran libraries which require linking against specific versions of MSVC libraries. I am not familiar with all of them, so the only advice I can offer now is to go back to the beginning and make sure that all sources are compiled with compatible settings for which run-time libraries are to be used.
Also, make sure that you have run ifortvars.bat to start your command session that runs the makefile. This is done automatically when you use the "Build Environment" shortcut in the Intel Visual Fortran program group.
I have meet same problem (__intel_alloc_bpv) when compile a 64 bit program. I am sureit's not about IX86 and AMD64 flag(In a small project with these flags, is OK ).
And I found why it happed. When use FORMAT, like this
WRITE(6,FMT=30) INT2, INT3
30 FORMAT(I, I<2*M>)
30 FORMAT(I
This bug happend. Can anyone help me?
