views:

37

answers:

2
+1  Q: 

CL.exe exit codes

Anyone know where I can get a list of CL.exe exit codes and what they mean? Google is not my friend on this and the particular code I'm getting (4) also doesn't seem to get any hits.

Although the meaning to code 4 would be nice, I'd prefer a site that actually lists them all.

A: 

MSDN says only says "cl.exe returns zero for success (no errors) and non-zero otherwise". http://msdn.microsoft.com/en-us/library/ebh0y918.aspx

Philip
+1  A: 

Undocumented. But it isn't unusual for a process to return the Windows error, COM failure HRESULT or exception code. Which explains why it isn't documented.

Windows error code 4 is "Too many open files". Got deeply nested .h files or recursive #includes without a guard?

Hans Passant
Well, using boost so yeah, got deeply nested .h files. It seems to be somewhat random though. You can just go ahead and rebuild and it works sometimes. Where'd you get the windows code?
Noah Roberts
Found them: http://msdn.microsoft.com/en-us/library/ms681382(VS.85).aspx
Noah Roberts
The WinError.h SDK header file.
Hans Passant
Use /showIncludes to get a trace of #included files.
Hans Passant
Yep. Think you're on to what the code means. It looks like the last file that was built (not the one showing on the "I blew up" line) has quite a few includes. Why it sometimes errors and not probably has something to do with other processes.
Noah Roberts