Build error cstdlib

May 18, 2010 at 6:52am
Hi,

Until yesterday, my projects were working fine (using Visual studio express 2008). Since then I have a "small" problem, it seems that I can't build anything when including any header remotely close to the standard library. I have uninstalled Visual studio express and installed the Pro version (twice..), but I still have the same problem.

For example, I can't even build this :

1
2
3
4
5
6
7
#include <iostream>

using namespace std;

void main()
{
}

It always does the two same errors:

c:\program files\microsoft visual studio 9.0\vc\include\cstdlib(26) : error C2039: 'exit' : is not a member of '`global namespace''
c:\program files\microsoft visual studio 9.0\vc\include\cstdlib(26) : error C2873: 'exit' : symbol cannot be used in a using-declaration


That's it, I don't really know what I can do to fix this.. By the way, it seems to work if I comment the line causing the errors in cstdlib, but I don't think it is a good solution to do so..

Anyway, if anyone can help me on this... :)
May 18, 2010 at 9:22am
Have you inadvertently change a system header file?
May 18, 2010 at 10:14am
Well, the only thing I did except than working on my projects, is trying to build some code I found here :

http://www.cppfrance.com/codes/CAMERA-OPENGL-UTILISANT-QUATERNIONS_36930.aspx

But reinstalling Visual Studio shouldn't overwrite all header files ?
May 18, 2010 at 10:21am
But reinstalling Visual Studio shouldn't overwrite all header files?
Yes.

You should be aware that the code you posted isn't valid C++.
Topic archived. No new replies allowed.