CImg
CImg copied to clipboard
compilation errors when building project with latest sources of CImg
Hi,
When building my project with Visual Studio 2019 under Windows using the latest sources of CImg master I get some new build errors:
\deps\CImg\CImg.h(28178,1): error C3974: 'ptrs': index variable in OpenMP 'for' statement must have integral type
\deps\CImg\CImg.h(28182,1): error C3974: 'ptrs': index variable in OpenMP 'for' statement must have integral type
\deps\CImg\CImg.h(28242,1): error C3016: 'off': index variable in OpenMP 'for' statement must have signed integral type
When building the same project with the sources of CImg revert-263-MC_improvement branch all those new compilation errors are gone. Until about a week ago it was no problem to compile agains the latest master sources of CImg .
thanks https://github.com/zulma46/convnet
I've done this commit : https://github.com/dtschump/CImg/commit/9c1c24d9d7fa743047382d3c0a40e9724ddb987a Could you check if that solves your problem, as intended ? I don't have MSVC right here on my computer.
Hi,
After using commit: (https://github.com/dtschump/CImg/commit/9c1c24d9d7fa743047382d3c0a40e9724ddb987a) I still have some issues:
\deps\CImg\CImg.h(28178,1): error C3015: initialization in OpenMP 'for' statement has improper form \deps\CImg\CImg.h(28182,1): error C3015: initialization in OpenMP 'for' statement has improper form
thanks
Humm. These error messages do not help a lot ! I don't know what I could do then :(
https://github.com/dtschump/CImg/commit/237afd12a30d9aecaed9c62704fd91ce060f46da and https://github.com/dtschump/CImg/commit/8a5f0ad446eda69f64a0107a7211cf99ea325020
may fix the issue !
Hi,
Sorry for the waiting.
The fixes you gave worked but I also have modified line 28244 in the same manner:
for (longT off = 0; off < (longT)nb; ++off) res += (double)_data[off] * (double)img[off];
After this the compilation was without an error!
thanks for the quick reply anf fix!
Hi, With your latest fixes (https://github.com/dtschump/CImg/commit/237afd12a30d9aecaed9c62704fd91ce060f46da) and (https://github.com/dtschump/CImg/commit/8a5f0ad446eda69f64a0107a7211cf99ea325020) everything compiled just fine! Sorry for the previous message. I overlooked the fix (https://github.com/dtschump/CImg/commit/8a5f0ad446eda69f64a0107a7211cf99ea325020)