Page 1 of 1

Cross compile hello world on SBC4

Posted: Fri Nov 27, 2020 8:02 am
by Julie96
Hi everyone,
I'm trying to cross
compile
some C code in order to execute it on a Phidget SBS4 - 3003
I already succeed to cross compile a simple .C file (

Code: Select all

printf("hello world");
) and execute it on the SBC using

Code: Select all

arm-linux-gnueabihf-gcc toolchain
.
Now I'm struggling to cross compile the phidget's hello world example. I'm trying to

Code: Select all

./configure --prefix=/usr/arm-linux-gnueabihf --build=i686-pc-linux-gnu --host=arm-linux-gnueabihf
as seen here, but i get an error :

Code: Select all

configure: error: Missing libusb!
I already installed

Code: Select all

libusb-1.0-0-dev
. Should I use a toolchain generator ? and how ?

thanks a lot :)

Re: Cross compile hello world on SBC4

Posted: Tue Dec 01, 2020 11:21 am
by Patrick
You will need to install the arm-linux-gnueabihf version of libusb-dev in order to cross compile.

It may be easier to just compile your program on the SBC4 itself - this is generally what I do unless I'm working with a really big project.

-Patrick