"Error spawning cl.exe" after modifying *.f file in mixed language prog

"Error spawning cl.exe" after modifying *.f file in mixed language prog


I have a mixed-language program (cpp and fortran), which was created by someone else who has CVF andthe MSC compiler installed. I don't havea C compiler, but I have CVF 6.6B.Can I rebuild the program after modifyingthe *.f code,without having touched thecpp stuff?

Related questions:
1. Do I absolutely need to get a C compiler to rebuild this program? (I don't actually need it for anything else)

2. Can I re-configure the project in some way that cl.exe is not needed?

3. Is there a legal way to get cl.exe without getting the whole MS Visual C package?

4. What exacty is Cl.exe? (a linker? a compiler? a pre-processor? none of the above?)



Message Edited by grtoro on 01-30-2004 11:30 AM

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you have all the .obj files which were built with the C compiler, you may not need the actual C compiler. That would depend on whether any libraries are needed which don't come with the CVF installation. There are commercial software packages like this which provide for customer written subroutines to be linked in, for which a customer license for CVF alone has been sufficient.
CL.exe is the command line version of the Microsoft C/C++ compiler. You could buy a non-optimizing version of it from programming tools shops, as Steve Lionel mentioned several times in this forum. It would include a pre-processor, a compiler, a linker functionally equivalent to the one provided with CVF, and libraries, some of them functionally equivalent to certain libraries provided with CVF.

Let's back up a bit...

You can do what you want as follows. Look in the CVF Programmer's Guide for information on using the LIB command. Use this to create a static library (.lib) of the C-compiled objects. Add this .lib to your project and remove the C source files. Then it won't look for Visual C.

If you buy the current Visual C++ Standard product, what you get is Visual C++.NET, which is not compatible with CVF. You may be able to find a copy of Visual C 6 Standard, which will work with CVF. But if you don't need to compile the C code, try the static library.

You may need to experiment with different settings under the Libraries tab, otherwise you'll get the dreaded Multiple C Library Syndrome. See the Visual Fortran Newsletters on the CVF web site for details on that.

Steve - Intel Developer Support

Interestingly, I am now running into this error message.

Of course, people submit their code right before "release freeze" andseem to introduce new features...

Here's my situation.

A "lib" built in C/C++.

A DLL built in C/C++.

and a .cpp routine that interfaces to the DLL called from Fortran.

Of course, I cannot compile the .cpp routine without running into the cl.exe problem. I have asked him to rewrite that in Fortran, but would another way be:

1) have the .cpp and lib built as a unit and then embedded in my Fortran project?

Any other suggestions (short of a c compiler -- which I have others of, just not C/C++ from Microsoft).


As I suggest above, if your project contains the .obj or .lib of the C code, and not the C source itself (which you can keep separate), it will just link it in and not look for a C compiler.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today