Compiler Error C3058
'symbol' : symbol not declared as 'threadprivate' before it is used in the 'copyin' clause
A symbol must first be declared threadprivate before it can be used in a copyin clause.
The following sample generates C3058:
// C3058.cpp
// compile with: /openmp
int x, y, z;
#pragma omp threadprivate(x, z)
void test() {
#pragma omp parallel copyin(x, y) // C3058
{
}
}
Possible resolution:
// C3058b.cpp
// compile with: /openmp /LD
int x, y, z;
#pragma omp threadprivate(x, y)
void test() {
#pragma omp parallel copyin(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