jeanlemotan / esp32-cam-fpv

esp32 cam digital low latency fpv
MIT License
278 stars 68 forks source link

Makefile with specific dir, which is NOT avaliable #17

Closed lida2003 closed 1 year ago

lida2003 commented 1 year ago

/opt/vc/include/, /usr/include/freetype2 is a specific dir. Is it possible to use code in git or any pre-configuration or setup procedure can hanle these specific dirs?

INCLUDE  := -Isrc \
    -Isrc/utils \
    -Isrc/imgui \
    -Icomponents/common \
    -I/opt/vc/include/ \
    -I/usr/include/freetype2

I tried raspberry pi3 build as docs suggested, it failed. And I checked Makefile it includes crc folder. Any idea?

pi@PiNas:~/Work/esp32-cam-fpv/gs $ make -j4
g++ -MT .o/src/main.o -MD -MP -MF .d/src/main.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/main.o src/main.cpp
g++ -MT .o/src/droid_sans_font.o -MD -MP -MF .d/src/droid_sans_font.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/droid_sans_font.o src/droid_sans_font.cpp
g++ -MT .o/src/HUD.o -MD -MP -MF .d/src/HUD.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/HUD.o src/HUD.cpp
g++ -MT .o/src/imgui_impl_opengl3.o -MD -MP -MF .d/src/imgui_impl_opengl3.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/imgui_impl_opengl3.o src/imgui_impl_opengl3.cpp
src/HUD.cpp:5:13: warning: 'void AddShadowText(ImDrawList&, const ImVec2&, ImU32, const char*)' defined but not used [-Wunused-function]
 static void AddShadowText(ImDrawList& drawList, const ImVec2& pos, ImU32 col, const char* text)
             ^~~~~~~~~~~~~
src/main.cpp:20:10: fatal error: crc.h: No such file or directory
 #include "crc.h"
          ^~~~~~~
compilation terminated.
make: *** [Makefile:126: .o/src/main.o] Error 1
make: *** Waiting for unfinished jobs....
mv -f .d/src/HUD.Td .d/src/HUD.d
mv -f .d/src/droid_sans_font.Td .d/src/droid_sans_font.d
mv -f .d/src/imgui_impl_opengl3.Td .d/src/imgui_impl_opengl3.d
pi@PiNas:~/Work/esp32-cam-fpv/gs $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
lida2003 commented 1 year ago

The above patch can solve compilation on RPI 3b+.

Hope the code can be compiled on laptop (ubuntu)

lida2003 commented 1 year ago

OK. I see the PR is accepted.