Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

fatal error : can not open file 'msvcrt.lib'

843829Oct 25 2007 — edited Feb 13 2008
Hello dudes !

I am using windows and jdk1.6. I want to develop one application using JNI. As steps for JNI, i have created Helloworld java class and compiled it, then created header file using jnh. After that i have created HelloWorld.c file.

To build dll file, i am executing the below command
"cl -Ic:\java\include -Ic:\java\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll".


Command giving the output as follows:

HelloWorld.c
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

/dll
/implib:HelloWorld.lib
/out:HelloWorld.dll
HelloWorld.obj
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'

Can anybody say why it is giving this problem.


Also i tried giving the msvcrt.lib path as the value for -MD option,
cl -Ic:\java\include -Ic:\java\include\win32 -MD"c:\Microsoft Visual Studio 8\VC\lib" -LD HelloWorld.c -FeHelloWorld.dll


Then it is giving "can not open file LIBCMT.lib" .

Note : ...\VC\lib and ....\VC\include are added in the path.

Can anybody tell the solution for this ?


Thanks in advance!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2008
Added on Oct 25 2007
2 comments
595 views