BOOST: compile error -- so confused

All,

I am new to using BOOST library. I only have a simple Visual Studio 2008 program:

#include "boost/thread/thread.hpp"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

When i compile it, i get these nasty errors:

:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(20) : error C2039: 'clock_t' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(20) : error C2873: 'clock_t' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(22) : error C2039: 'asctime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(22) : error C2873: 'asctime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(22) : error C2039: 'clock' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(22) : error C2873: 'clock' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(22) : error C2039: 'ctime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(22) : error C2873: 'ctime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(23) : error C2039: 'difftime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(23) : error C2873: 'difftime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(23) : error C2039: 'gmtime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(23) : error C2873: 'gmtime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(23) : error C2039: 'localtime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(23) : error C2873: 'localtime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(24) : error C2039: 'mktime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(24) : error C2873: 'mktime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(24) : error C2039: 'strftime' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(24) : error C2873: 'strftime' : symbol cannot be used in a using-declaration
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(24) : error C2039: 'time' : is not a member of '`global namespace''
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\ctime(24) : error C2873: 'time' : symbol cannot be used in a using-declaration



Can anyone help? It compile sucessfully if i do not include the boost/thread/thread.hpp.
See this thread:
http://stackoverflow.com/questions/2174519/how-to-include-boostthread-in-your-c-project

It explains exactly why you have this problem. BTW, I learned something new today! Thank you for that.
methodos' link is about linking errors, not about the compiler errors you're seeing, so I'm not sure it's the same problem you're seeing.

This sounds more to me like some sort of library conflict. When you compiled boost, did you use the same settings you are using to compile this test program?

Apart from that, the only things I can think of that would cause this is your ctime header is screwed up (unlikely) or you have some really weird macro being defined that's gumming up the works.

Is that really the entire program? Just the include and main and nothing else?
Topic archived. No new replies allowed.