- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have attempted to build a program with both Visual Fortran 9.1and from the command line, and I've been unable to get either to work for different reasons.
With the Visual interface, I get a fatal error saying that LIBC cannot be read. I searched for LIBC.lib in my "Microsoft Visual Studio8VClib" folder, and it's not there (nor is it anywhere else). My LIB environment variable is set to that folder, and several others.
From the command line, I am able to compile all of the subroutines and functions, but the final linking process gives me an error saying "unrecognized source type 'file.mod' " Modules are not a recognized source type? Confusing.
If you have any ideas about this, please drop a line - I have no clue.
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need an installation of Microsoft C++ which is compatible with your ifort, and with your version of Visual Studio, if that is what you are using. C++ is available, either as a component of Visual Studio installation, or (in some cases) as a separate SDK installation. This C++ installation would provide required libraries, including LIBC.LIB.After you add C++ to your installation, repairing your ifort installation should take care of it. If the advice in the ifort installation notes is insufficient, you might file a support request on premier.intel.com, where you would have to give more details identifying your versions of VS and ifort.
The simplest way to deal with .mod files is to avoid the issue by letting ifort take care of it. The source code for the .mod would normally be in a .f or .f90 file, and you would include that source file in the list of files for your command line
ifort yourmodule.f90 yourmain.f90 .....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim's response is not applicable to your problem.
As of Visual Studio 2005, Microsoft no longer provides single-threaded libraries, including LIBC.LIB. If you have an old object or library that you then try to link with VC8, you'll get this error. The Intel Fortran compiler defaults to /MT (multithread static library) if you don't ask for a different choice.
The solution for you is to recompile the old objects so that there are no longer references to LIBC.LIB. Please read the compiler release notes for more on this subject.
As for .mod files, you do not name these on the command line. Rather, make sure that they can be found in the places the compiler looks for INCLUDE files. By default, this is the same directory as the source file (.f90 or .f) where the USE statement is found, or you can add directories with /INCLUDE.

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