HelloWorld.exe doesn't run

Hello there,

I'm using Visual C++ Express Edition the first time. Thus I was making a HelloWorld.cpp by chosing Win32 Console Application. I'm also using the latest PSDK for x86.
My HelloWorld.exe runs within the IDE and also within a command prompt on my computer where Windows XP is running.
Unfortunately it doesn't run on another computer I have with Windows XP.
What could be wrong
Any suggestions are welcome. :)

Thank you for your help.

CU,

common


Answer this question

HelloWorld.exe doesn't run

  • solderer

    Thats not right, all projects under win32 don't require CLR to run. Only the .net programs require the CLR.

  • Rot

    Another thing that might be happening is that you need to install the SxS binaries on the other machine as well or you will have to link statically to the CRT (using the compiler option /MT). Take a look at http://msdn2.microsoft.com/en-us/library/ms235624.aspx for more info.

    Thanks,
      Ayman Shoukry
      VC++ Team

  • tyaramis

    I am using the C runtime, although I am not using MFC... just the PSDK.  I have included these DLLs and the SxS files w/o success.   I am getting an error when trying to run the exe, stating that the program is unable to be run...


  • gdfgdf

    Thank you for you rapid answer.
    That's what I think too. But I wonder because I chose File -> New -> Project -> Visual C++ -> Win32 -> Win32 Console Application and not CLR -> CLR Console Application.
    Is it possible to switch off this in the project properties And if yes where

    CU,

    Thomas



  • Mamun

    OK, if I understand right the new feature of Visual C++ 2005 is the support for CLR. Therefore I can't switch off this future and each application I develop with needs CLR.

    CU,

    Thomas

  • MeghaP

    The only problem is that I am compiling on Windows 2000 Professional. The only solution right now is to install the .Net 2.0 Redist.  The only problem is that I don't want to have to distbribute the dotnetfx for 2.0 with such a light weight application.

    ...

  • yhanwong

    I don't have a CLR project but it's running only in a .net version 2.0 environment.
    After I installed .net version 2.0 on the other computer my application is running there too.
    So I don't use any CLR classes in my source code but it seems to me that compiled applications with visual c++ express edition require a .net environment to run.

    CU,

    Thomas

  • Rinaldi

    If you're using MFC, you need the MFC dll.  If you're using C runtime functions, you need the MSVCRT dll. 


  • ComputerSolutions

    VC6 came with a program called Depends.  You need something like that, to tell you what dlls you need.


  • JimBeanz

    So what is the full answer to this problem
    I am developing applications with the PSDK and do not need anything related to the CLR.  I tried as suggested and compile with the /MT option, but I got a boat load of linker errors.  I also tried copying the WinSxS files to the other system (Windows 2000 Professional), without success. 

    Now if you tell me that I need the .net Framework 2.0 even though I am not using it is insane.

    Any help would be appreciated...

    Thanks Big Smile

  • tstein

    Odds are that you created a C++/CLI project, which requires the .NET framework 2.0 to be installed in order to run.


  • Vinny_1973

    The only problem is that I am compiling on Windows 2000 Professional.

    So

    The only solution right now is to install the .Net 2.0 Redist


    If that fixes it, then you HAVE created a managed project, and that is the only solution apart from creating a new project that does not use .NET.



  • HelloWorld.exe doesn't run