[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cross compiling gsl for arm cortex M4 (nrf52)
From: |
Mark Galassi |
Subject: |
Re: cross compiling gsl for arm cortex M4 (nrf52) |
Date: |
Mon, 18 Sep 2023 08:33:12 -0600 |
Dear Julius,
Your problem seems like it might have a straightforward solution. Whenever you
do a lot of setting of CC and CXX and LD you might also want to set
C_INCLUDE_PATH and CPLUS_INCLUDE_PATH (and maybe when you get to linking also
LIBRARY_PATH).
I would try finding the full path to the gsl_minmax.h file. Let's say it's in
/mycrosscompilearea/stuff/include/gsl/gsl_minmax.h. Then, noting that what's
being #included is gsl/gsl_minmax.h, and I would say something like
C_INCLUDE_PATH=/mycrosscompilearea/stuff/include:$C_INCLUDE_PATH
And the same for LDFLAGS and (if you use C++) for CPLUS_INCLUDE_PATH.
You might also be able to put a -I option into the CFLAGS setting you are
already using.
And I would also investigate using pkg-config -- I have not used it in
cross-compiling, so it might not work for you, but you can set your
PKG_CONFIG_PATH to include /mycrosscompilearea/stuff/lib/wherever_gsl.pc_is and
then use the usual:
pkg-config gsl --cflags
pkg-config gsl --libs
Feel free to contact me further if you want to look at this together.