- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got a link error:
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
The file is there but the compiler not finding it.
I am making a 32bit version on Xeon with Intel Fortran 9.1 [IA32].
My lib environment which I get from "Options" under "Tool" menu is:
$(IFORTInstallDir)Lib
$(VCInstallDir)lib
$(VCInstallDir)atlmfclib
$(VCInstallDir)atlmfclibi386
$(VCInstallDir)PlatformSDKlib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib
C:Program Files (x86)Microsoft Visual Studio 8VCATLMFCLIB
C:Program Files (x86)Microsoft Visual Studio 8VCLIB
C:Program Files (x86)Microsoft Visual Studio 8VCPlatformSDKlib
C:Program Files (x86)Microsoft Visual Studio 8SDKv2.0lib
%IFORT_COMPILER91%IA32Lib
%IFORT_COMPILER91%EM64TLib
Could you please let me know what's wrong?
-BO
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a mixed soln with C and Fortran.
Here is the log start and end with some of the middlelog deleted.
1>------ Rebuild All started: Project: tg230_lib, Configuration: Debug Win32 ------
1>Deleting intermediate files and output files for project 'tg230_lib', configuration 'Debug|Win32'.
1>Compiling with Intel Fortran 9.1 C:Program Files (x86)IntelCompilerFortran9.1IA32...
1>tascflow ascflw9.f
1>projectpspher.f
1>partsstarseq.f
1>partsextrude.f
1>parseadmicr.f
1>outputotopaz3d.f
1>output
eutral.f
1>outputennike3d.f
1>options zopts.f
1>optionsdnopts.f
1>mergelocate.f
1>irisguispecfnc.f
1>C: gsrc.230irisguispecfnc.f(1436) : Warning: The data type of the actual argument does not match the definition. [1]
1>irisguimenustrg.f
1>C: gsrc.230irisguimenustrg.f(94) : Warning: The data type of the actual argument does not match the definition. [1]
1>irisguiguips.f
1>C: gsrc.230irisguiguips.f(181) : Warning: The data type of the actual argument does not match the definition. [1]
1>irisguiGlonlymovesrc.f
1>irisguidwbttn.f
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(21) : Info: This statement function has not been used. [JOR]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(21) : Info: This statement function has not been used. [JOR]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(21) : Info: This statement function has not been used. [JOR]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>.includedeflgop.h(21) : Info: This statement function has not been used. [JOR]
1>.includedeflgop.h(31) : Info: This statement function has not been used. [JSHIFTR]
1>.includedeflgop.h(41) : Info: This statement function has not been used. [JSHIFTL]
1>C: gsrc.230irisguidwbttn.f(638) : Warning: The data type of the actual argument does not match the definition. [1]
1>interpolxcurves.f
1>interpolmesh.f
1>inputindyna3d.f
........
DELETED: because it's too long.
.......
2>c: gsrc.230secure3setmcc.c(323) : warning C4305: 'function' : truncation from 'double' to 'float'
2>c: gsrc.230secure3setmcc.c(757) : warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2> c:program files (x86)microsoft visual studio 8vcincludestring.h(157) : see declaration of 'strncpy'
2>c: gsrc.230secure3setmcc.c(758) : warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2> c:program files (x86)microsoft visual studio 8vcincludestring.h(157) : see declaration of 'strncpy'
2>c: gsrc.230secure3setmcc.c(771) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2> c:program files (x86)microsoft visual studio 8vcincludestring.h(74) : see declaration of 'strcpy'
2>c: gsrc.230secure3setmcc.c(781) : warning C4101: 'l' : unreferenced local variable
2>c: gsrc.230secure3setmcc.c(780) : warning C4101: 'j' : unreferenced local variable
2>Generating Code...
2>Compiling resources...
2>Compiling manifest to resources...
2>Linking...
2>LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
2>Build log was saved at "file://c: gsrc.230DEBUGBuildLog.htm"
2>tg230 - 1 error(s), 923 warning(s)
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped =========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Visual Studio, go to Tools > Options > Projects > VC++ Directories. For "Library Files", add the full path to the Intel Fortran "Lib" folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
It solved the problem and I successfully made the 32 bit version
on Xeon.
Now, I am trying to make a 64bit version and got the link error:
2>tg230_lib.lib(dialog1.obj) : error LNK2001: unresolved external symbol _for_write_seq_fmt.
I checked the forum in the past and set:
Disable Default Library Search Rules: No
for my Debug Configuration.
FYI: I set the environment as below for the 64 bit version:
Fortran side:
Set Target Platform: x64 which also set Slected Compiler
as Intel Fortran 9.1 [IA32_EM64T] automatically.
Library directory is set as
C:Program Files (x86)IntelCompilerFortran9.1em64tLib
VC++ side:
VC Projects and Solutions:
VC++ directories:
Platforms: x64
It's done in "Options" under "Tools".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I followed the step to setup 64-bit version as you suggested.
Now, I got the error:
1>------ Build started: Project: tg230, Configuration: Debug x64 ------
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'
1>Build log was saved at "file://c: gsrc.230x64DebugBuildLog.htm"
1>tg230 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
I put the following path into the VC++ directories:
C:Program Files (x86)IntelCompilerFortran9.1em64tLib
which is for 64bit.
Related to this, there is a strange behavior in the Options Dialog.
In VC++ Directories of "Porjects and Solutions" node under "Tools",
I can not set the Platform x64 from Win32. It stays Win32 when I get back and open the Option dialog even though I set it to x64 and clicked OK.
-BO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once you have done so, you'll find that the directory lists are different for "Win32" and "x64". Make sure you select the right platform when updating the lists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using VS2005 Standard Edition.
So, I have seperate directories for 32 and 64.
Thanks to your help, I do not have the link error for "ifconsol.lib" any more. When I switchtheplatform to x64,I see the directory lists have been changed. However, I can make it stay as x64. When I revisit the Option for VC++ Directories,platform is still Win32.
Any idea?
-BO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a way to set x64 for VC++ directories.
I set up the environment using command prompt and then fire up
vs2005 from the prompt window.
Start menu->Visual Studio Tools->x64 Win64 Command prompt
C:Program Files (x86)Microsoft Visual Studio 8VC
"C:Program Files (x86)Microsoft Visual Studio 8Common7IDEdevenv.exe" /useenv
If I use this method, the list will not change whether it's Win32 or x64.
It shows the ones only for x64.
But I would like to understand why I can not set x64 if I do not use the 64 env prompt.
******Another question:
Some of my routinesare using 3rd party library which does not have 64bit version and got errors because of it. Is there a way of specifying the library(i.e.use this 32bit library)to use only for a specific routine while others remain 64bit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot mix 32-bit and 64-bit code in an application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to your help, I sucessfully built the 32 and 64 bit versions.
Now I am trying to build release version starting from 32bit.
I am gettting some unresolved external link errors, i.e. "strlen()", "sprintf()", "printf()" etc. though
it has the proper
Could you tell me if there are any major differences in setttingsbetween debugging and release version. I am using mixed Fortran and C?
-BO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It probably means that your C libraries somehow get ignored by the linker. Check your build log, project settings, especially if /Zl option is perhaps active. To me it seems like your installation of development toolchain is messed up. I would uninstall everything if I were you and start from scratch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think an uninstall is warranted yet - you can probably fix things with the proper settings.
Can you post a build log showing the ifort command line, cl command line and link command line?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me clarify what I meant when I suggested reinstall above — Steve is absolutely right, there is a chance to fix it with proper settings and that should be attempted first. But for someone not familiar with setting up those things reinstall might end up being an easier way out of the "mess".
Recreating the solution/project files and making sure that you set all 4 configurations properly (Win32|Debug, Win32|Release, x64|Debug, and x64|Release), would also be among the things I would try before the reinstall.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I like to have a fresh start since I feel I messed it up.
But before doing it, I'd like to know what went wrong and get some clues so that I do not make same mistakes again.
Here are my setups for debug and release for 32bit.
===============Release=====================
C/C++ cmd:
/I ".include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WOGL" /D "RAINBOW" /D "WIN" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /FD /EHsc /MT /Fp".Release/mtg230.pch" /Fo".Release/" /Fd".Release/" /W3 /nologo /c /TP /errorReport:prompt
Fortran cmd:
/nologo /include:".include" /include:".include3" /include:".secure3" /define:WIN /define:WOGL /f77rtl /intconstant /iface:cref /module:"$(INTDIR)/" /object:"$(INTDIR)/" /traceback /libs:static /threads /winapp /c
Linker cmd:
/OUT:"C:myapp/mtg.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:myapp" /LIBPATH:"C:myapp etcdf-3.5.0.win32binlib" /LIBPATH:"C:Program FilesMicrosoft Visual StudioDF98Lib" /LIBPATH:"C:Program FilesMicrosoft Visual StudioVC98Lib" /LIBPATH:"C:Program FilesIntelCompilerFortran9.1IA32lib" /MANIFEST /MANIFESTFILE:".Releasemtg.exe.intermediate.manifest" /NODEFAULTLIB:"libcmt.lib" /SUBSYSTEM:CONSOLE /MACHINE:X86 /ERRORREPORT:PROMPT version.lib wsock32.lib spromeps.lib winmm.lib netapi32.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib netcdfs.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..myappmtg230_lib.lib"
===============Debug=====================
Fortran cmd:
/nologo /Zi /Od /include:".include" /include:".include3" /include:".secure3" /define:WIN /define:WOGL /f77rtl /intconstant /module:"$(INTDIR)/" /object:"$(INTDIR)/" /traceback /libs:static /threads /dbglibs /winapp /c
C/C++ cmd:
/Od /I "C:mtgsrc.230include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "WOGL" /D "RAINBOW" /D "WIN" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Fp".DEBUG/mtg230.pch" /Fo".DEBUG/" /Fd".DEBUG/" /W3 /nologo /c /ZI /TP /errorReport:prompt
Linker cmd:
/OUT:".debug/mtg230-debug.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:myapp" /LIBPATH:"C:myapp etcdf-3.5.0.win32binlib" /LIBPATH:"C:mtgsrc.230" /LIBPATH:"C:Program FilesIntelCompilerFortran9.1IA32lib" /MANIFEST /MANIFESTFILE:".DEBUGmtg230-debug.exe.intermediate.manifest" /NODEFAULTLIB:"libcmt.lib" /NODEFAULTLIB:"libc.lib" /DEBUG /PDB:".debug/mtg230-debug.pdb" /MAP:".debugmtg230-debug.map" /SUBSYSTEM:CONSOLE /MACHINE:X86 /ERRORREPORT:PROMPT version.lib wsock32.lib spromeps.lib winmm.lib netapi32.lib opengl32.lib glu32.lib netcdfs.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..myappmtg230_lib.lib"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In VS, go to Tools > Options > Intel Fortran > Directories. In each of the Executable, Library and Include file settings, delete any entries including "DF98" in the path. Do the same for Tools > Options > Projects > VC++ Directories.
I would also advise removing the DF98 paths from the PATH, LIB and INCLUDE system environment variables (which is how they ended up in the VS paths)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, and what about:
/NODEFAULTLIB:"libcmt.lib"
And:
/NODEFAULTLIB:"libc.lib"
Should that be included in the project settings or not? No wonder strlen(), sprintf() and such are unresolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It worked but partially.
I removed libcmt.lib from the "ignore lib" option. Success!!
However, it appears I still need that library when I move the solution file
to another machine and ran it. What could make the difference?
System environment?
1>------ Build started: Project: mtg230, Configuration: Release x64 ------
1>Linking...
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: malloc already defined in LIBCMT.lib(malloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _heap_alloc already defined in LIBCMT.lib(malloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: calloc already defined in LIBCMT.lib(calloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: realloc already defined in LIBCMT.lib(realloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _recalloc already defined in LIBCMT.lib(realloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: free already defined in LIBCMT.lib(free.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: _msize already defined in LIBCMT.lib(msize.obj)
1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in LIBCMT.lib(dbghook.obj)
1>LIBCMTD.lib(isctype.obj) : error LNK2005: _isctype_l already defined in LIBCMT.lib(isctype.obj)
1>LIBCMTD.lib(isctype.obj) : error LNK2005: _isctype already defined in LIBCMT.lib(isctype.obj)
1> Creating library C:myapp/mtg64.lib and object C:myapp/mtg64.exp
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:myapp/mtg64.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://c:myapp.230.64bitx64ReleaseBuildLog.htm"
1>mtg230 - 11 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
N
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page