#1825 closed Bugs (fixed)
thread.hpp injects windows.h and breaks user application.
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.35.0 | Severity: | Regression |
Keywords: | Cc: |
Description
reduced testcase:
#include <boost/thread/thread.hpp> int const ERROR = 1;
works fine with boost-1.34.1 and doesn't compile with 1.35.0.
Compiling... example.cpp example.cpp(2) : warning C4091: '' : ignored on left of 'const int' when no variable is declared example.cpp(2) : error C2143: syntax error : missing ';' before 'constant' example.cpp(2) : error C2059: syntax error : 'constant'
Change History (6)
comment:1 by , 14 years ago
follow-up: 3 comment:2 by , 14 years ago
Boost.DateTime is fixed now, so this ticket might be fixed, too.
follow-up: 4 comment:3 by , 14 years ago
comment:4 by , 14 years ago
Replying to rotoglup@gmail.com:
Replying to andysem:
Boost.DateTime is fixed now, so this ticket might be fixed, too.
As of boost_1_37_0, the problem still exists : windows.h is included by 'thread.hpp' due to 'boost/date_time/microsec_time_clock.hpp'
The fix didn't make it into 1.37. It will be released in 1.38. It is now available in trunk and branches/release.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 10 years ago
I have this problem, but I can build my application in debug configuration. However, when I switch to release, it doesn't build and gives me this error
error C2146: syntax error : missing ';' before identifier 'curr' c:\libraries\boost\boost_1_46_1\boost\date_time\microsec_time_clock.hpp 99 1 SceneStateRecognition error C2065: 'curr' : undeclared identifier c:\libraries\boost\boost_1_46_1\boost\date_time\microsec_time_clock.hpp 99 1 SceneStateRecognition
I could not post the whole thing, but this is more or less what is coming out...
Does anyone know how to fix this?
This is due to the dependency on boost.datetime, which includes <windows.h>.