none
Not a Valid Win32 Application Error

    Question

  • I am writing a simple native C++ program using Microsoft Visual Studio 2008. The weird thing is,
    the program has been working fine and all of suddent after I recompiled (added some cout statements)
    I cannot run the new executible as the error message "not a valid win32 application" pops out.
    I tried a diffrent program that was compiled a while ago and it ran fine. But then as soon as I re-compiled
    that program it had the same error!
    It appears something has happened to the compiler (cl) or some other settings so I cannot
    compile native C++ programs and run them under my XP machine any more. Even the simple ones like

    #include <iostream>

    int main (void)
    {

     std::cout << "hello world";
    }
     
    has the same error.


    any help is appreciated,
    thanks,

    AW
    Wednesday, January 30, 2008 7:35 PM

Answers

  • never mind.
    I reset the enviromental variables by using vcvars32.bat and the compilation seems
    to be back to normal now..



    Wednesday, January 30, 2008 7:55 PM