Cl.exe and mt.exe but got "...MSVCR80.dll was not found. Re-installing..."

The compile and manifest were completed with no complaints but when I ran the code, I got "This application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem.".
Here is what I did:
Step 1: Compile and manifest
"%MSVCDir%\bin\cl.exe" /I"%JAVA_HOME%\include" /I"%JAVA_HOME%\include\win32" /MD /LD /FeBinless.dll ../info/binless/jni_binless.c ../jni_shared/jni_gen_c.c ../jni_entropy/jni_entropy_c.c ../jni_input/jni_input_c.c ../info/binless/binless_c.c ../../info/binless/BinlessOpenComp.c ../../info/binless/BinlessWarpComp.c ../../info/binless/BinlessEmbedComp.c ../../info/binless/BinlessInfoComp.c ../../shared/MatrixToHist2DComp.c ../../shared/Info2DComp.c ../../shared/sort_c.c ../../shared/gen_c.c ../../shared/hist_c.c ../../input/input_c.c ../../entropy/entropy_c.c ../../entropy/entropy_bub_c.c ../../entropy/entropy_chaoshen_c.c ../../entropy/entropy_ma_c.c ../../entropy/entropy_tpmc_c.c ../../entropy/entropy_jack_c.c ../../entropy/entropy_plugin_c.c ../../entropy/entropy_ww_c.c ../../entropy/variance_jack_c.c ../../entropy/variance_boot_c.c ../../entropy/entropy_nsb_c.cpp /link libxml2.lib libgsl.a libgslcblas.a >> binless-out.txt
mt.exe -manifest Binless.dll.manifest -outputresource:Binless.dll;2
The operating system is Windows XP and has the following environment variables:
PATH=%JAVA_HOME%\bin;%LIBXMLDir%\bin;%ICONVDir%\bin;%GNUWINDir%\bin;%WINSDKDir%\bin;%MSVCDir%\bin;%MSVCDir%\..\Common7\IDE;%ZLIBDir%\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem
INCLUDE=%WINSDKDir%\include;%GNUWINDir%\include;%MSVCDir%\include;%MSVCDir%\PlatformSDK\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32;%LIBXMLDir%\include;%ICONVDir%\include;%ZLIBDir%\include
LIB=%WINSDKDir%\lib;%GNUWINDir%\lib;%MSVCDir%\lib;%MSVCDir%\PlatformSDK\lib;%LIBXMLDir%\lib;%ICONVDir%\lib;%ZLIBDir%\lib
where:
GNUWINDir=c:\project\lib\GnuWin32
ZLIBDir=c:\project\lib\zlib
ICONVDir=c:\project\lib\iconv
LIBXMLDir=c:\project\lib\libxml2
WINSDKDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A
MSVCDir=C:\Program Files\Microsoft Visual Studio 9.0\VC
Step 2: Compile the Java jni code
javac -d ..\classes ..\server\Binless.java
Step 3: Run the code
java -classpath ..\classes jni.test.test_binless
Got: This application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem.
Any help is greatly appreciated. Thanks.

This is a Windows side-by-side issue not a JNI issue. As such it doesn't really
belong in this forum except as an object lesson to people who create JNI's.
I had these issues when I moved to Visual Studio 2005 - which, oddly enough,
was the version of the IDE where SxS support was not only introduced, but
enforced.
The fact that you tried to put a SxS folder in the PATH tells me you know
nothing about how SxS and manifests works. You need to learn about these
things and then your problems will become blushingly obvious.
The Binless.dll manifest must be embedded, and it must contain dependency
entries that specify the SxS requirements, including the version(s) of the
dependent libraries. Secondly, the specific version of the libraries must be
installed on the target system.
My guess is your manifest specifies a CRT version that's not installed on your
system and that is why the system is complaining. Look for the
Binless.dll.intermediate.manifest file. It will tell you what your dll expects.
Here's an example of a dll (debug version) manifest:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.30729.4148' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.DebugMFC' version='9.0.30729.4148' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.ATL' version='9.0.30729.4148' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>Get [Dependency Walker|http://www.dependencywalker.com/] it's free. You will need it at some point.
Cheers,
Mike

Similar Messages

Maybe you are looking for

  • Inbox messages won't appear on Mail

    My ymail account won't sync to my Mail. I'm on OS X. I'm not too sure what happened. All my other accounts like hotmail and another yahoo mail are synced and I can access my messages. I tried deleting the account but it's still the same.

  • Printing Mailing Labels from Address Book

    Stupid question, but one that is driving me crazy. How do you print a sheet of mailing labels from Address Book but when the entire sheet of labels is the SAME label? I can print labels successfully in address book, can select the label type and numb

  • Please delete my Adobe account and remove all my data from your servers

    As above. Thank you.

  • Require a formula to calc the diff between 2 running total fields in a crosstab

    Post Author: PJM CA Forum: General Hi, I have built a crosstab in Crystal XI with the following columns: PROFILED BUDGET (a)                            EXPENDITURE TO DATE (b)                        VARIANCE (a-b) The profiled budget and expenditure

  • Choosing proper image file format

    I was wondering if anyone else had ever experienced this connundrum: In my business documents (in Word) if I insert my logo in tif format, it looks great when the document is printed, but horrible in digital format; conversely, if I use .png the imag