tags:

views:

368

answers:

1

Hey folks,

I am trying to compile a c++ application using the following command in command prompt:

cl -I"c:\Program files\Java\jdk1.5.0_07\include" -I"c:\program files\java\jdk1.5.0_07\include\win32" -MD -LD HelloWorld.cpp -FeHelloWorld.dll

However this produces the following error:

LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'

Any ideas of what is causing this and how to fix it?

I have visual studio 2005 installed on windows.

Thanks,

-Pete

+4  A: 

Yes, you need to tell the linker where to find MSVCRT.lib, as it's not in your LIBPATH.

It should be here: C:\Program Files\Microsoft Visual Studio 7\VC\lib

Alan
thanks! adding:-link -LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib"solved it
Petey B