Closed sylsau closed 2 years ago
I simply added this include line to include/common/yafaray_common.h
:
#include <cstddef>
As such :
#ifndef YAFARAY_COMMON_H
#define YAFARAY_COMMON_H
#define BEGIN_YAFARAY namespace yafaray {
#define END_YAFARAY }
#include <cstddef>
static constexpr float min_raydist_global = 0.00005f;
static constexpr float shadow_bias_global = 0.0005f;
#endif // YAFARAY_COMMON_H
It then proceeded to compile without any issue.
It's probably not the "safest" way to include another header but I do not know how cmake works so that's what I did. Hope it helps someone.
Thank you.
Hello.
Thank you very much for your bug report, all the information provided and the suggested solution. I've added a commit including cstddef in the common header as you suggested.
This seems to be a new behavior in gcc-11, as you said it's perhaps overkill to add that header to the common YafaRay header but considering size_t is such a widespread data type, I think it's reasonable for now.
Thanks again for your input!
By the way, keep in mind that the v4 C API is still subject to major changes I plan to do soon, that's one of the reasons why v4 is still considered unstable/experimental at the moment.
Hello !
Thank you for the amazing work you do!
I ran into some error while compiling on Linux.
Here are my installed packages :
Hopefully I was able to solve the problem following the compiler's advice.
I am opening this issue in case someone else gets the same problem.