Visual C++ Developer Center > Visual C++ Forums > Visual C++ Language > Release version on different computer without Visual 2008
Ask a questionAsk a question
 

QuestionRelease version on different computer without Visual 2008

  • Thursday, October 29, 2009 7:06 PMEspectroDK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi there

    I have some problems getting my program to run on a windows xp that does not have Visual 2008 installed. My program is C++ .net (windows forms) - and I can't figure out how to make it run. I have tried to install the "Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) but when running the program, I still get the following error:

    "The application failed to initialize properly (0xc0150002). Click on OK to terminate the application."

    Any ideas?

All Replies

  • Thursday, October 29, 2009 7:16 PM«_Superman_»MVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    There may be other dependencies.
    Check using Dependency Walker.

    By the way, do you have the .Net framework installed.

    It is best to create an installation package.
    Some packages like InstallShield are powerful enough to auto-detect dependencies and include them automatically.


    «_Superman_»
    Microsoft MVP (Visual C++)
  • Thursday, October 29, 2009 7:38 PMReed Copsey, Jr. Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Also, if you're using Windows Forms (.NET), make sure the other computer has the appropriate .NET Framework redistributable installed.  This is required to run applications compiled with /CLR.
    Reed Copsey, Jr. - http://reedcopsey.com
  • Thursday, October 29, 2009 7:53 PMEspectroDK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Okay, I downloaded the .NET framework, but still to no avail. Superman, I tried the Dependency Walker, and it gave me a long list of dependencies, and I got 4 warnings that it could not find (I made the test on my development computer, and the file runs fine, though):

    MSVCR90D.DLL
    DHD.DLL
    HD.DLL
    IESHIMS.DLL

    So what does that mean, what do I have to do? 
    :(
  • Thursday, October 29, 2009 7:56 PMcrescens2k Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You are trying to use the debug build on the other computer.
    The debug versions of VC runtime are not redistributable. You should change the build configuration in the VS IDE to release and then use that.
    Visit my (not very good) blog at http://c2kblog.blogspot.com/
  • Thursday, October 29, 2009 7:56 PMReed Copsey, Jr. Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You need to compile the application in release mode, not debug mode.

    Right now, you've taken a depdenency to the debug versions of the Visual C++ runtime.  These cannot (legally) be distributed to a computer without Visual Studio installed.

    If you recompile in release mode, the MSVCR90D.DLL dependency will go away, and the normal VC++ Runtime will work correctly.
    Reed Copsey, Jr. - http://reedcopsey.com
  • Thursday, October 29, 2009 8:21 PMEspectroDK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Okay, I had some .lib files that were debugging only, so I changed these. Now another problem occurs, though. When I run the program (which is a win32 program) the console show up and the program runs until it is supposed to open the Windows Form, then it crashes with the message: "hapitest.exe has encountered a problem and needs to close." (The program still works fine on the development machine).

    I might have a clue, though:
    When I run the Dependency Walker on my development machine (windows 7) I get the following file names that are missing on the computer:
    DHD.DLL
    HD.DLL
    IESHIMS.DLL
    And the following warnings:
    "Warning: At least one delay-load dependency module was not found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module."

    Now, if I try the same thing on my target computer (WinXP) that cannot run the program, the missing file list is:
    DHD.DLL
    HD.DLL
    IESHIMS.DLL
    WER.DLL

    So the target machine misses the WER.DLL compared to my development machine, might this make the program crash whenever the windows form window is supposed to open?

    Kind regards
    Michael
  • Thursday, October 29, 2009 10:14 PMBrian MuthMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    http://channel9.msdn.com/forums/TechOff/488932-IESHIMSDLL--WERDLL-missing/

    Note the manifest issue which needs to be double-checked. Also bear in mind that there are several versions of the VC++ redistributable (VC 2005, VC 2008, VC 2008 SP1), so you need to pick the right one.
  • Tuesday, November 03, 2009 6:30 PMEspectroDK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Okay, I simply can't make it work. I have tried to install the missing .dlls found using the dependency walker, but the program still crashes whenever the Windows Form try to open. If I do not Run the windows form, the program does not crash.

    I use some third party activeX component for accessing data from some hardware, but I do not think that should be a problem? I installed/uninstalled microsoft framework 1, microsoft framework 1.1, microsoft framework 2.0, microsoft framework 3.0, microsoft framework 3.5 and microsoft framework 3.5 SP1. But nothing seems to be working, I still get a crash whenever the windows form is supposed to come up. I have "Use only standard windows libraries" under "use of MFC" in my project properties and I have "Common Language Runtime Support".

    I have checked my manifest-thingy, and this is what comes up under ressource viewer:

    <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"></requestedExecutionLevel>
          </requestedPrivileges>
        </security>
      </trustInfo>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
    </assembly>
    Furthermore, I have an additional .dll dependancy - an excel reader/writer called libxl. When I check the manifest of that one, I get this:

    <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"></requestedExecutionLevel>
          </requestedPrivileges>
        </security>
      </trustInfo>
    </assembly>
    I really have no idea what to do next? The program runs fine on my development machine :(.
    Any ideas?

    Kind regards
    Michael