Hi,
I am facing cpp build issue when using stdlib malloc (build on windows). Despite the
is provided the cpp compiler returns this error when using malloc in the code:
error: 'malloc' was not declared in this scopenote: 'malloc' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'? 16 | #include <cstdlib> +++ |+#include <cstdlib> Reference code:
This issue was caused by -ffreestanding compiler flag, all seem to be ok when removed.
Thank you for coming back to share the solution you found with the community.