Unanswered error MSB6006: "CL.exe" exit code 2

  • Friday, July 27, 2012 1:05 PM
     
     

    I am getting this error: (error MSB6006: "CL.exe" exit code 2) when trying to build a win32 c++ app in Visual Studio 2010.  I created a new c++ console application and tried to build it using visual studio, but I get this error. 

    I have no issues when using Visual Studio 2008.

    I've tried reinstalling/repairing VS 2010 as well as uninstalling and reinstalling it.  I'm not sure what else to try.    This post (http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/742dc49b-5fe1-4808-97b4-a8103617406c?prof=required) mentioned the PATH variable, but isn't clear what is/may be missing.

    Any help would be great.

    Regards,
    Joey

All Replies

  • Friday, July 27, 2012 1:32 PM
     
     
    Do you get any more messages in the Ouptut window?  cl.exe will exit with a non-zero error code any time compilation fails, but it usually prints out an error message as well.
  • Sunday, July 29, 2012 3:50 PM
     
     

    No I don't get any additional error messages.

    What does code 2 mean?  I haven't been able to find anything on the error codes.

    Thanks,

    Joey

  • Sunday, July 29, 2012 4:05 PM
     
     

    There is the related question on the forum:

    http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/742dc49b-5fe1-4808-97b4-a8103617406c

    Have you tried the provided solution?

  • Sunday, July 29, 2012 5:10 PM
     
     

    That thread (which I linked to in my first post) mentions two errors.  The first one I'm not getting (errorC1190) and the second one (cl.exe error code 2) mentions something may be missing in the PATH variable.  It isn't clear what is/may be missing.

  • Tuesday, August 14, 2012 2:28 AM
     
     
    Provide more details about your doubt...

    Please not forget mark your answer, and unmark your disagreed point.