- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recently installed IntelFortran to compile and run an existing model written in Fortran.
Iam using a makefile from the build environment command line.Itwill compile each .obj but when it goes to link them, I getthe following error:
Fatal error cannot open ifconsol
xilink: error:problem during multi-file optimization compilation (code 1)
When I installed fortran, I opted to have the system variables updated for me. I have since then checked them and they seem to be fine. LIB is pointing to the right place, and ifconsol.lib is there where it should be.
I have also run ifortvars.bat prior to compiling, but it does not help either.
I REALLY need to get the code compiled. I've submitted the problem through premier.intel.com and got one reply ... telling me to use the build environment, which I have been using. I've gotten no follow up and am desperate. I would greatly appreciate any help I can get. Thanks.
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check your makefile to see if it has an explicit reference to ifconsol. It shouldn't.
Post your makefile so we can see it.
Post your makefile so we can see it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The makefile does not refer to ifconsol. I am attaching it here as a text file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I recall correctly, the "right" linker message would be "Cannot find ifconsol.lib" if it can't find it. Reference to "ifconsol" (without lib) seems strange.
You can use /verbose linker option (and redirect linker output to a file, preferrably) to see where ifconsol is referenced. That should give you some clues.
You can use /verbose linker option (and redirect linker output to a file, preferrably) to see where ifconsol is referenced. That should give you some clues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. The message refers to ifconsol rather than ifconsol.lib. Where do I put in the /verbose linker option? I am not a FORTRAN programmer, so I'm a little out of my depths here ... I'm an energy modeler. The program I'm trying to compile is an energy model written by someone else (the model definitely works and compiles correctly for other people).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this. In your makefile, replace all occurrences of "xilink" with "ifort". Alternatively, replace them with "link".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestion. ifort gave me the same error as before. When I used link instead of xilink it also crashed, but gave a different error. There was a series ofwarnings like this:
dummyx.obj: warning link 4006:: _world already defined in world.obj; second definition ignored
then:
LINK: fatal error LNK1181: cannot open input file 'user32.lib'
NMAKE : fatal error U1077: 'link' : return code '0x49d'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, interesting.
Ok, user32.lib is provided in the Platform SDK which is installed along with VS2003. You may need to add that to your LIB path as well.
I don't know what to tell you about the duplicate symbol warnings. You should probably have someone local who is familiar with the application look at the makefile.
Ok, user32.lib is provided in the Platform SDK which is installed along with VS2003. You may need to add that to your LIB path as well.
I don't know what to tell you about the duplicate symbol warnings. You should probably have someone local who is familiar with the application look at the makefile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, dummyx.f (and dummypp.f) suspiciously look as if they shouldn't be linked with looks as if someone deliberately wrote some dummy substitution routines for something already defined in world.f.
As for user32.lib, quite a few VF programs have to be linked with it, and it's normally pulled in automatically if LIB environment variable contains path to platform SDK Lib folder. However, if it were the case, the linker should also complain about Kernel32.lib (a must) and gdi32.lib (listed in the makefile)? Could you please find instances of kernel32.lib and user32.lib on your computer and cross-check them against LIB path?
As for user32.lib, quite a few VF programs have to be linked with it, and it's normally pulled in automatically if LIB environment variable contains path to platform SDK Lib folder. However, if it were the case, the linker should also complain about Kernel32.lib (a must) and gdi32.lib (listed in the makefile)? Could you please find instances of kernel32.lib and user32.lib on your computer and cross-check them against LIB path?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know if this is relevant for theOP problem, as s/he is using the commandline and we use the VS IDE,but yesterday I came across the same linker error.
We have a VS "solution" with two projects which buildsa dll.The "main" projectis C++ and the other is Fortran. There are two configurations Debug and Release. The Debug build gave the link error that it could not find ifconsol.lib.
We solved the problemas follows : Inthe VS IDE Tools->Options under the Projects->C++ Directories option for Library fileswe added the line $(IFORT_COMPILER90)IA32lib
This fixed the link message but left me slightly confused why the release version built but the debug version didn't.
Les

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page