Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29308 Discussions

error LNK2019: unresolved external symbol _GETCWD@8 referenced in function _

Ashley_Weinstein
Beginner
1,734 Views
I have some code that I was able to debug through two weeks ago but now when I attempt to compile and link I get the following error messages below.

Why would this compile in Release mode but not Debug mode? I've run through the solution/project options with no luck.

Any help figuring this out is appreciated!!! Thanks =)

Build Log

Build started: Project: RSISPYEXE, Configuration: Debug|Win32

Output
Compiling with Intel Visual Fortran Compiler XE 12.1.1.258 [IA-32]...
ifort /nologo /debug:full /Od /warn:interfaces /iface:cvf /module:"Debug\\" /object:"Debug\\" /Fd"Debugvc90.pdb" /traceback /check:bounds /libs:static /threads /dbglibs /c /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\\bin" "K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSIDECNFG.f90"
K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSIDECNFG.f90(173): warning #6371: A jump into a block from outside the block may have occurred.   [25]
            GOTO 25
-----------------^
K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSIDECNFG.f90(192): warning #6371: A jump into a block from outside the block may have occurred.   [26]
            GOTO 26
-----------------^

ifort /nologo /debug:full /Od /warn:interfaces /iface:cvf /module:"Debug\\" /object:"Debug\\" /Fd"Debugvc90.pdb" /traceback /check:bounds /libs:static /threads /dbglibs /c /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\\bin" "K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSISPY.f90"
K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSISPY.f90(433): warning #8055: The procedure has a dummy argument that has the ALLOCATABLE, ASYNCHRONOUS, OPTIONAL, POINTER, TARGET, VALUE or VOLATILE attribute. Required explicit interface is missing from original source.   [INPUTDATL]
    CALL RSIDECNFG(FNam1,InputDatL,NumReadI)    !Pass *.rsi file to decryption subroutine. Receive back original *.dat text line by line and # lines.
-------------------------^

Linking...
Link /OUT:"DebugRSISPYEXE.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEDebugRSISPYEXE.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEDebugRSISPYEXE.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEDebugRSISPYEXE.lib" "DebugRSIDECNFG.obj" "DebugRSISPY.obj"
Link: executing 'link'
RSIDECNFG.obj : error LNK2019: unresolved external symbol _GETCWD@8 referenced in function _RSIDECNFG
DebugRSISPYEXE.exe : fatal error LNK1120: 1 unresolved externals


RSISPYEXE - 2 error(s), 3 warning(s)
Build Log

Build started: Project: RSISPYEXE, Configuration: Release|Win32

Output
Compiling with Intel Visual Fortran Compiler XE 12.1.1.258 [IA-32]...
ifort /nologo /module:"Release\\" /object:"Release\\" /Fd"Releasevc90.pdb" /libs:static /threads /c /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\\bin" "K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSIDECNFG.f90"
K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSIDECNFG.f90(173): warning #6371: A jump into a block from outside the block may have occurred.   [25]
            GOTO 25
-----------------^
K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSIDECNFG.f90(192): warning #6371: A jump into a block from outside the block may have occurred.   [26]
            GOTO 26
-----------------^

ifort /nologo /module:"Release\\" /object:"Release\\" /Fd"Releasevc90.pdb" /libs:static /threads /c /Qvc9 /Qlocation,link,"c:Program FilesMicrosoft Visual Studio 9.0VC\\bin" "K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXERSISPY.f90"
Linking...
Link /OUT:"ReleaseRSISPYEXE.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEReleaseRSISPYEXE.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEReleaseRSISPYEXE.lib" "ReleaseRSIDECNFG.obj" "ReleaseRSISPY.obj"
Link: executing 'link'

Embedding manifest...
mt.exe /nologo /outputresource:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEReleaseRSISPYEXE.exe;#1" /manifest "K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEReleaseRSISPYEXE.exe.intermediate.manifest"

RSISPYEXE - 0 error(s), 2 warning(s)

Debug

FORTRAN

/nologo /debug:full /Od /warn:interfaces /iface:cvf /module:"Debug\\" /object:"Debug\\"
/Fd"Debugvc90.pdb" /traceback /check:bounds /libs:static /threads /dbglibs /c

LINKER

/OUT:"DebugRSISPYEXE.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST
/MANIFESTFILE:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEDebugRSISPYEXE.exe.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
/PDB:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEDebugRSISPYEXE.pdb"
/SUBSYSTEM:CONSOLE /IMPLIB:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEDebugRSISPYEXE.lib"

Release

FORTRAN

/nologo /module:"Release\\" /object:"Release\\" /Fd"Releasevc90.pdb" /libs:static /threads /c

LINKER

/OUT:"ReleaseRSISPYEXE.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST
/MANIFESTFILE:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEReleaseRSISPYEXE.exe.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE
/IMPLIB:"K:PyrotecSoftwareRSISimcon930680IVFRSIIOFACEEXERSISPYEXEReleaseRSISPYEXE.lib"
0 Kudos
1 Solution
Steven_L_Intel1
Employee
1,734 Views
You have /iface:cvf set for Debug, not Release. Take it out of Debug. This is under Fortran > External Procedures.

View solution in original post

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,735 Views
You have /iface:cvf set for Debug, not Release. Take it out of Debug. This is under Fortran > External Procedures.
0 Kudos
Ashley_Weinstein
Beginner
1,734 Views
Thank you so much!!! I don't remember flagging this option for Debug since then but I must have.

One more question: when I incorporate this code into some legacy code (or vice versa), I'll be using RSISPY.f90 as the routine that will interface with a 3rd party executable (say Excel). So I'll be needing to use the '!DEC$ ATTRIBUTES DLLEXPORT ::' calling procedure.

Will I need to add any additional modifiers to the calling procedure like STDCALL?
0 Kudos
Steven_L_Intel1
Employee
1,734 Views
If your code will be called from Excel, then yes, you will need STDCALL and probably REFERENCE and ALIAS as well.
0 Kudos
Ashley_Weinstein
Beginner
1,734 Views
Thanks Steve! I'll find out what works when the time comes.
0 Kudos
Reply