Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29270 Discussions

fatal error LNK1104: cannot open file 'VCOMP.lib'

jahid817
Beginner
2,736 Views
Hi all,

I am using Fortran Compiler 10.0.025 [IA-32]

I am getting the following error while compiling

fatal error LNK1104: cannot open file 'VCOMP.lib'

Can anyone give me a solution for this problem?

Thanks in advance.

jahid
0 Kudos
10 Replies
Les_Neilson
Valued Contributor II
2,736 Views
One way is :
Under Project -> Properties ->Linker -> Input put vcomp.lib in the "Additional dependencies" box.
Under Linker -> General add the path to vcomp.lib in the "Additional Library Directories" box.

(or just put the path+vcomp.lib in the Linker->Input box)
The "path" may be relative to the current project directory eg ..libvcomp.lib)

Les
0 Kudos
jahid817
Beginner
2,736 Views
Quoting - Les Neilson
One way is :
Under Project -> Properties ->Linker -> Input put vcomp.lib in the "Additional dependencies" box.
Under Linker -> General add the path to vcomp.lib in the "Additional Library Directories" box.

(or just put the path+vcomp.lib in the Linker->Input box)
The "path" may be relative to the current project directory eg ..libvcomp.lib)

Les

I can't find vcomp.lib in my system. Do you how can I get it?
0 Kudos
Steven_L_Intel1
Employee
2,736 Views
vcomp.lib is part of Microsoft Visual C++. Does your application include object files compiled with Visual C++?

From what I can see with a Google search, Visual C++ Express Edition omits this library, so if you're using Intel Fortran with Visual C++ Express Edition and have enabled OpenMP in C++ code you may get a reference to this library. You may be able to get away with adding vcomp.lib to the "Ignore libraries" Linker property page.
0 Kudos
TimP
Honored Contributor III
2,736 Views
My (limited) understanding is the vcomp.lib is the OpenMP run-time library supplied in VS2005 and VS2008 (but not supplied by Express). References to it must come from .obj compiled by or supplied with MSVC. As Steve pointed out, the problem could be caused by setting /openmp in a VC Express build. All functions in vcomp must be supplied also by the libiomp5 which comes with ifort 10.1 and later. So, if your .obj are built by ifort 10.0 or later, it should be OK to set a nodefaultlib (ignore libraries) entry, if you can't find out how to rebuild without that reference, and link in libiomp5 ( /Qopenmp-lib:compat, if using 10.1).
It is not a good idea to link vcomp, as it duplicates some but not all functions of ifort. We haven't determined whether certain unstable variables are a result of getting this wrong.
0 Kudos
jahid817
Beginner
2,736 Views
i am using Microsoft Visual Studio 2005* Premier Partner Edition-ENU which comes with the compiler CD.

i have tried OpenMP (enable)with the same error. I have also tried to add vcomp.lib in ignore libraries and i got lots other link errors.
0 Kudos
Steven_L_Intel1
Employee
2,736 Views
Is your application all Fortran source or are you linking in some non-Fortran objects or libraries? Which compiler version do you have? You can try adding /Qopenmp-lib:compat and see if that helps.
0 Kudos
TimP
Honored Contributor III
2,736 Views
Quoting - jahid817
i am using Microsoft Visual Studio 2005* Premier Partner Edition-ENU which comes with the compiler CD.

i have tried OpenMP (enable)with the same error. I have also tried to add vcomp.lib in ignore libraries and i got lots other link errors.
As the PPE has no Microsoft compiler, it would omit the Microsoft OpenMP library. If you are including objects built with Microsoft OpenMP, you would need the corresponding Intel openmp-lib:compat library, which was introduced in ifort 10.1. If your license is renewed, you will be able to download it.
0 Kudos
jahid817
Beginner
2,736 Views
First I like to thank all of you. But still have the same problem.

Here is some part of the Buildlog.htm

Compiling with Intel Fortran Compiler 10.1.014 [IA-32]...

ifort /nologo /Zi /Od /gen-interfaces /warn:interfaces /module:&quotDebug\" /object:&quotDebug\" /traceback /check:bounds /libs:static /threads /dbglibs /c /Qopenmp-lib:compat /extfor:f /Qvc8 /Qlocation,link,&quotC:Program FilesMicrosoft Visual Studio 8VCbin" &quotC:Documents and Settingsg0501212My Documentsnewdyn21dyn21dyn21.f"
.
.
.

Linking...
Link /OUT:&quotDebugdyn21.exe" /INCREMENTAL:NO /NOLOGO /NODEFAULTLIB:&quotLIBCMT.lib" /NODEFAULTLIB:&quotmsvcrt.lib" /MANIFEST /MANIFESTFILE:&quotC:Documents and Settingsdyn21debugdyn21.exe.intermediate.manifest" /DEBUG /PDB:&quotC:Documents and Settings dyn21debugdyn21.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:&quotC:Documents and Settingsdyn21debugdyn21.lib" &quotDebugdyn21.obj" &quotDebugdyn21b.obj" &quotC:Documents and Settingsdyn21libdyna.lib" &quotC:Documents and Settingsdyn21libansys.lib"
libansys.lib(lm_new.obj):warning : locally defined symbol __imp__time imported
Link: executing 'link'
LINK : fatal error LNK1104: cannot open file 'VCOMP.lib'
0 Kudos
Steven_L_Intel1
Employee
2,736 Views
I don't see that you've taken any of the suggestions made so far.
0 Kudos
TimP
Honored Contributor III
2,736 Views
Now that you've revealed that you are relinking LS-DYNA, a material fact which you've concealed, I must point out that the vendor is quite liberal with trials and support. There are a substantial number of MSVC compiled objects, although no intentional use of vcomp. PPE doesn't claim to support this usage, and it's likely it's not possible, due to other library inconsistencies. You should be able to get past the vcomp error with a nodefaultlib, as we suggested, but then you may run into other problems.
As you must arrange with the vendor for support and follow their advice, asking here for suggestions about other methods is inconsistent.
Copying from an html view of your buildlog, rather than from a saved text file, makes it unnecessarily unreadable.
Possible alternatives to PPE include VS Express for 32-bit command line linking. There's a reason we asked whether you were using that. For 32- or 64-bit, I believe there is a 90-day trial version of Visual Studio.
0 Kudos
Reply