wuhanstudio / u8g2-arm-linux

U8g2 for arm linux - a monochrome graphics library
https://github.com/wuhanstudio/u8g2-arm-linux/wiki
Other
51 stars 24 forks source link

Cannot compile examples - missing files #9

Closed karlo922 closed 7 months ago

karlo922 commented 7 months ago

With your current content of the lib, I could not compile any of the examples:

gcc -I ../../../drivers -I ../../../csrc -I ../../../port -W -Wall -D __ARM_LINUX__ -DPERIPHERY_GPIO_CDEV_SUPPORT=1  -c -o u8g2_4wire_sw_spi.o u8g2_4wire_sw_spi.c
In file included from u8g2_4wire_sw_spi.c:1:
../../../port/u8g2port.h:9:10: fatal error: gpio.h: No such file or directory
    9 | #include "gpio.h"
      |          ^~~~~~~~
compilation terminated.
make: *** [<builtin>: u8g2_4wire_sw_spi.o] Error 1

The directory c-periphery is empty. When I copied the correct files in it, it worked again

wuhanstudio commented 7 months ago

Hi,

The c-periphery is a git submodule, which can be initialised using:

git submodule init git submodule update

karlo922 commented 7 months ago

Thanks! Maybe you could add this in your readme for others like me ;)

karlo922 commented 7 months ago

Saw that you already have mentionned that a git clone alone is not enough. Closing the issue

wuhanstudio commented 7 months ago

Yes, another alternative is to use git clone —recursive to recursively initialise submodules while cloning.