I am running a code in Eclipse tool and using cygwin compiler and my code is running without any problem.
But when I am running the same code in SDK (vivado) which has arm processor, I am getting the error "undefined reference to posix_memalign".
Even when I have included the library stdlib.h
At one place I read that using the flag -std=c99 will solve this problem, I tried and no results.
Any suggestions how to deal with this error.
Thanks in advance.
"undefined reference" is a linker error referring to missing object code rather than header file. None of the default or explicitly linked libraries contains the function.
Thank you @FvM.
Can you help me which flag do I need to include so that it'll link that code.
I tried -stdlib, -stdlib=legacy_stdlib, -fno_builtin, -std=c99, -std=c11 etc .. but didnt got any success