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.hAny suggestions how to deal with this error.Thanks in advance.
The posix_memalign may be a definition or macro, which is defined by Cygwin, but not by Vivado SDK.
Google shows some suggestions:
1) https://github.com/gmarcais/Jellyfish/issues/99 Configure with ./configure CXXFLAGS=-std=gnu++11. It will be automatic in the next release.
./configure CXXFLAGS=-std=gnu++11
2) https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-08/msg00485.html
Calls to memalign are handled by Cygwin's memalign, which always returns ENOSYS if the application has defined its own malloc. So we have to rename memalign in order to make sure that posix_memalign calls Emacs's memalign rather than Cygwin's.
3) https://stackoverflow.com/questions/33696092/whats-the-correct-replacement-for-posix-memalign-in-windows