- NanoPi Neo Air
- Matrix ibrary from https://github.com/friendlyarm/matrix compiled and instaled
I can run the demos and compile them in C but would like to utelise SPI and GPI from the main libarry in c++
When i compile my code using c++ linking to the "fahw" libarry I get this error:
code is here https://github.com/leonyuhanov/NanoPi_APA102/blob/master/spitest.c
administrator@FriendlyARM:~/spitest$ g++ -L/usr/local/lib spitest.c -o spitest -lfahw -I ../lib/includes/
spitest.c:(.text+0x1bc): undefined reference to `boardInit()'
spitest.c:(.text+0x1ca): undefined reference to `openHW(char const*, int)'
spitest.c:(.text+0x1f2): undefined reference to `setSPIDataMode(int, int)'
spitest.c:(.text+0x204): undefined reference to `setSPIWriteBitsPerWord(int, int)'
spitest.c:(.text+0x220): undefined reference to `setSPIMaxSpeed(int, unsigned int)'
collect2: error: ld returned 1 exit status
Above code compiles and runs perfectly with gcc