locked
Visual C++ Express- Cant do a freakin thing with it RRS feed

  • Question

  • I downloaded microsoft visual C++ 2005 express.
    I tried to run a basic C++ hello program that should just print hello using cout.
    It wont work it gives me

    ------ Build started: Project: Hello2, Configuration: Debug Win32 ------
    Compiling...
    Hello2.cpp
    Linking...
    Embedding manifest...
    Project : error PRJ0003 : Error spawning 'cmd.exe'.
    Build log was saved at "file://c:\Documents and Settings\My Name\My Documents\Visual Studio 2005\Projects\Hello2\Hello2\Debug\BuildLog.htm"
    Hello2 - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    I think I read something about needing the new microsoft platform sdk for to run win 32 programs.
    I cant download that cos its far too big and Im stuck with dialup connection.

    Is there anyway I can get this to run C++ programs that arent win32 without having to download that Massive SDK?
    Thursday, February 22, 2007 6:47 PM

Answers

  • hello

    Re: Visual C++ Express- Cant do a freakin thing with it

    please refer to the following link that talking about similar problem:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=172610&SiteID=1

    http://www.interact-sw.co.uk/iangblog/2005/09/12/cmdspawnerror

    regards

    rico

    Friday, February 23, 2007 7:43 AM
  • 'Hello2.exe': Loaded 'C:\Documents and Settings\David Quinn\My Documents\Visual Studio 2005\Projects\Hello2\debug\Hello2.exe', Symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.

    this is generated in linking time, not run-time, and it is all correct because all DLLs has been loaded.

    The program '[3500] Hello2.exe: Native' has exited with code 0 (0x0).

    By convention, a exit code of 0 means the program completed successfully. So your program runs correctly. I can not see any big error in this output information. Does your program behavors different from your expected or can you tell us why you think there is a big error here?

    thanks

    rico

    Saturday, February 24, 2007 4:53 AM
  • Your program may indeed be executing correctly but too fast for you to see. Try running your program with CTRL-F5 instead of F5.
    Thursday, March 1, 2007 12:55 AM

All replies

  • hello

    Re: Visual C++ Express- Cant do a freakin thing with it

    please refer to the following link that talking about similar problem:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=172610&SiteID=1

    http://www.interact-sw.co.uk/iangblog/2005/09/12/cmdspawnerror

    regards

    rico

    Friday, February 23, 2007 7:43 AM
  • I tried going into tools , options and project and solutions and adding in what someone said in that thread that Rico linked to.

    Now it compiles but when run I get this big error.



    'Hello2.exe': Loaded 'C:\Documents and Settings\David Quinn\My Documents\Visual Studio 2005\Projects\Hello2\debug\Hello2.exe', Symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
    The program '[3500] Hello2.exe: Native' has exited with code 0 (0x0).

    Friday, February 23, 2007 9:04 PM
  • 'Hello2.exe': Loaded 'C:\Documents and Settings\David Quinn\My Documents\Visual Studio 2005\Projects\Hello2\debug\Hello2.exe', Symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', No symbols loaded.
    'Hello2.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.

    this is generated in linking time, not run-time, and it is all correct because all DLLs has been loaded.

    The program '[3500] Hello2.exe: Native' has exited with code 0 (0x0).

    By convention, a exit code of 0 means the program completed successfully. So your program runs correctly. I can not see any big error in this output information. Does your program behavors different from your expected or can you tell us why you think there is a big error here?

    thanks

    rico

    Saturday, February 24, 2007 4:53 AM
  • Your program may indeed be executing correctly but too fast for you to see. Try running your program with CTRL-F5 instead of F5.
    Thursday, March 1, 2007 12:55 AM
  • You were right it was running too fast for me to see it.
    Thanks for that.

    Anyway just wondering why does it run so fast?
    Bit silly isnt it.
    Is there anyway I can get it to run slower when pressing the regular green triangle run button?
    Tuesday, March 6, 2007 4:03 AM
  • I remember there is a post before that mentioned "system("pause");", not sure why it disappear now, but anyway, there are many ways to slow down the screen display duration, system("pause"); is one option, or you can try Win32 api Sleep(), or you can use getch() to wait for input.
    Tuesday, March 6, 2007 4:25 AM
  • a standard trick is to put in a command that reads a line (or single character) from the input using a blocking read (using for example std::cin).
    That way the application won't end until you hit a key on your keyboard, and as the command windows stays up until the application terminates it too will stay up.
    Wednesday, March 7, 2007 8:40 AM
  • It used to be way back in the early days of PCs that could slow your PC down - you could force it back to the original PC clock speed (16 MHz if I remember well - or was it 8 MHz?). Anyway these days there isn't much you can do - short of actually making your PC do some real work - maybe render a complicated 3D image: that'll probably take it all of a second or so :-(.

    CTRL-F5, a call to system("pause"), or a call to something like getchar are all good ways to pause your program before it exits.

    Wednesday, March 7, 2007 4:37 PM