canutils移植到ARM Linux

2019-07-13 06:16发布

 ./configure --host=arm-linux-gnueabihf  --prefix=/work/src_packages/can_tools/bin/libsocketcan/ make 
make install

  ./configure --host=arm-linux-gnueabihf --prefix=/work/src_packages/can_tools/bin/canutils    libsocketcan_LIBS=-lsocketcan LDFLAGS=-L/work/src_packages/can_tools/bin/libsocketcan/lib  libsocketcan_CFLAGS=-I/work/src_packages/can_tools/bin/libsocketcan/include  CFLAGS=-I/work/src_packages/can_tools/bin/libsocketcan/include
注意是libsocketcan_CFLAGS 而不是CPPFLAGS
参考链接:http://blog.csdn.net/sno_guo/article/details/17029295