When building source with Visual studio 2017 with OpenMP,some errors occur in file domset.cpp .
the lines in domset.cpp :
https://github.com/openMVG/openMVG/blob/master/src/software/SfM/clustering/domSetLibrary/domset.cc#L437-440
https://github.com/openMVG/openMVG/blob/master/src/software/SfM/clustering/domSetLibrary/domset.cc#L454-458
https://github.com/openMVG/openMVG/blob/master/src/software/SfM/clustering/domSetLibrary/domset.cc#L468-471
size_t should be modified to int or int64 when OpenMP options on .
size_t can be replaced by intptr_t
It should compile fine, since here you see some casting: https://github.com/openMVG/openMVG/blob/master/src/software/SfM/clustering/domSetLibrary/domset.cc#L19
Can you copy paste here the error message you have in Visual Studio?
#if OPENMVG_USE_OPENMP
#pragma omp parallel for
#endif
for ( size_t i = 0; i < numX; i++ )
{
Rp( i, i ) = R( i, i );
}
the error message:
error C3016: “i”: OpenMP“for”语句中的索引变量必须是有符号的整型.
I translate it into English with Google.
Error C3016: "i": The index variable in the OpenMP "for" statement must be a signed integer.
Ok, got it.
It should be changed to something like:
#if OPENMVG_USE_OPENMP
#pragma omp parallel for
#endif
for_parallel( i, numX )
Will do the update soon.
Thank you for your feedback.
Please, can you give a try again to the develop branch?
Yes, I have updated the source code with the develop branch and compiled it with Visual Studio 2017. It's works fine.
Thanks.
Please, can you close the issue.