You will probably need to download either a curses-devel package, or download and build the ncurses package for your target architecture.
is complaining when you point it to local include directories, since those are intended for the native compiler on your build host. I have 4 cross toolchains from various origins and three of them have ncurses.h
installed in the sys-root of the toolchain. My ncurses-5.8 installation doesn't seem to have the header file either. I've lost track of whether I installed that package or not, but I wonder if the header file only gets created at install time.
You can re-configure your ncurses source package with the --prefix
option, pointing --prefix
to a non-system directory, such as the curses source tree itself. Then, make
and make install
the cross-compiled package. See if it creates an include directory with ncurses.h
in it. If so, either copy the contents to the sys-root of your cross toolchain, or point to it with your gcc
Another possibility is that since there is probably a curses shared object library on your target host filesystem, you might find the respective ncurses.h there.
And, now that I've looked at the arguments you are using, I wonder if they are correct. CPPFLAGS
is typically used for the C preprocessor, but I always add include paths with CFLAGS:
gcc CFLAGS+=-I /some/include/path