Compiler Error C3053
'symbol' : 'threadprivate' is only valid for global or static data items
Symbols passed to threadprivate must either be global or static.
The following sample generates C3053:
// C3053.cpp
// compile with: /openmp
void Test() {
int x, y;
#pragma omp threadprivate(x, y) // C3053
#pragma omp parallel copyin(x, y)
{
x = y;
}
}
Possible resolution:
// C3053b.cpp
// compile with: /openmp /LD
int x, y;
#pragma omp threadprivate(x, y)
void Test() {
#pragma omp parallel copyin(x, y)
{
x = y;
}
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for