Comments (3)
You can change this line to
add_executable(main main.c mouse_cursor_icon.c custom/*.c generated/*.c)
from lv_port_linux.
- I have to say, I've had more misreports。
- As you can see, I'm porting GUI_GUIDER to my Linux board. Here's a demo example。
- I can't find GUI_GUIDER auto-generated script, unable to batch modify the header file problem.
└── lvgl_Demo
├── build // 可执行文件二进制
├── custom // GUI_GUIDER生成文件
│ ├── custom.c // #include "lvgl.h" 无法找到,需要更改为 #include "../lvgl/lvgl.h"
│ ├── custom.h
│ ├── custom.mk
│ ├── custom.py
│ ├── lv_conf_ext.h
│ ├── mp1544294806.png
│ ├── mp-1789058473.png
│ ├── spectrum_1.h
│ ├── spectrum_2.h
│ └── spectrum_3.h
├── generated
│ ├── events_init.c // #include "lvgl.h" 无法找到,需要更改为 #include "../lvgl/lvgl.h"
│ ├── events_init.h
│ ├── generated.mk
│ ├── guider_customer_fonts
│ │ ├── guider_customer_fonts.h
│ │ └── guider_customer_fonts.mk
│ ├── guider_fonts
│ │ ├── guider_fonts.h
│ │ ├── guider_fonts.mk
│ │ ├── lv_font_arial_16.c // #include "lvgl.h" 无法找到,需要更改为 #include "../lvgl/lvgl.h"
│ │ ├── lv_font_arial_20.c // ...
│ │ ├── lv_font_arial_23.c
│ │ ├── lv_font_arial_26.c
│ │ ├── lv_font_simsun_18.c
│ │ └── lv_font_simsun_20.c
│ ├── gui_guider.c
│ ├── gui_guider.h
│ ├── images
│ │ ├── _btn_list_pause_alpha_70x70.c // ...
│ │ ├── _btn_list_play_alpha_70x70.c
│ │ ├── _btn_loop_alpha_25x25.c
│ │ ├── _btn_next_alpha_61x61.c
│ │ ├── _btn_pause_alpha_80x80.c
│ │ ├── _btn_play_alpha_80x80.c
│ │ ├── _btn_prev_alpha_61x61.c
│ │ ├── _btn_rnd_alpha_25x25.c
│ │ ├── _cover_1_alpha_175x175.c
│ │ ├── _cover_2_alpha_175x175.c
│ │ ├── _cover_3_alpha_175x175.c
│ │ ├── _icn_chart_alpha_25x25.c
│ │ ├── _icn_chat_alpha_25x25.c
│ │ ├── _icn_download_alpha_25x25.c
│ │ ├── _icn_heart_alpha_25x25.c
│ │ ├── _icn_slider_alpha_25x25.c
│ │ ├── images.mk
│ │ ├── _wave_bottom_alpha_800x51.c
│ │ └── _wave_top_alpha_800x51.c
│ └── setup_scr_screen.c
├── lv_drivers
│ ├── CMakeLists.txt
│
├── lvgl
│ ├── CMakeLists.txt
│ ├── component.mk
│ ├── demos
│ ├── ...
├── main.c
├── main.o
├── Makefile
└── tree.txt
- 9.0 version of cmakelist does not support GUI_GUIDER I replaced 8.3.10 lvgl, this is my MakeFile
# Makefile
# Directory settings
makefile_name := $(abspath $(lastword $(MAKEFILE_LIST)))
makefile_path := $(strip $(patsubst %/,% , $(dir $(makefile_name))))
libfile_path := $(makefile_path)/../lib/x86
LVGL_DIR ?= ${shell pwd}
PRJ_DIR := $(LVGL_DIR)
LVGL_DIR_NAME ?= lvgl
BUILD_DIR := build/
OBJ_DIR := $(BUILD_DIR)object/
GEN_OBJ_DIR := $(OBJ_DIR)generated/
BIN_DIR := $(BUILD_DIR)bin/
NORMAL_OUT := 1
RM := rm -f
RMDIR := rm -rf
ifeq ($(OS),Windows_NT)
LDFLAGS += -LSDL2\i686-w64-mingw32\lib
SIMULATOR_EXE = simulator.exe
BUILD_ENV := build\object build\bin
NULL_OUT := nul
MKDIR_P = mkdir
else
SIMULATOR_EXE = simulator
NULL_OUT := /dev/null
MKDIR_P = mkdir -p
endif
# Compiler settings
CC ?= gcc
CFLAGS ?= -O3 -g0 -I$(LVGL_DIR)/ -Wall -Wshadow -Wundef -Wmissing-prototypes \
-Wno-discarded-qualifiers -Wall -Wextra -Wno-unused-function \
-Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing \
-Wno-error=cpp -Wuninitialized -Wmaybe-uninitialized \
-Wno-unused-parameter -Wno-missing-field-initializers \
-Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral \
-Wno-cast-qual -Wunreachable-code -Wno-switch-default \
-Wreturn-type -Wmultichar -Wformat-security -Wno-ignored-qualifiers \
-Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes \
-Wdouble-promotion -Wclobbered -Wdeprecated -Wempty-body \
-Wtype-limits -Wshift-negative-value -Wstack-usage=2048 \
-Wno-unused-value -Wno-unused-parameter -Wno-missing-field-initializers \
-Wuninitialized -Wmaybe-uninitialized -Wall -Wextra \
-Wno-unused-parameter -Wno-missing-field-initializers \
-Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral \
-Wpointer-arith -Wno-cast-qual -Wmissing-prototypes \
-Wunreachable-code -Wno-switch-default -Wreturn-type \
-Wmultichar -Wno-discarded-qualifiers -Wformat-security \
-Wno-ignored-qualifiers -Wno-sign-compare
CFLAGS += -DLV_CONF_INCLUDE_SIMPLE=1
ifeq ($(OS),Windows_NT)
LDFLAGS := -lSDL2 -L$(libfile_path) -ldecoder -lopenh264 -lrlottie -lstdc++ -lm
else
LDFLAGS := -lSDL2 -L$(libfile_path) -ldecoder -lopenh264 -lrlottie -lpthread -lstdc++ -lm -ldl
endif
ifeq ($(OS),Windows_NT)
#SDL2
CFLAGS += "-ISDL2\i686-w64-mingw32\include" -MMD -MP
endif
# Binary name
BIN := $(BIN_DIR)demo
# Collect the files to compile
MAINSRC := ./main.c
DEPPATH += --dep-path $(makefile_path)/
VPATH += :$(makefile_path)/
CFLAGS += "-I$(makefile_path)/"
include $(LVGL_DIR)/lvgl/lvgl.mk
include $(LVGL_DIR)/lv_drivers/lv_drivers.mk
include $(PRJ_DIR)/custom/custom.mk
include $(PRJ_DIR)/generated/generated.mk
CSRCS += main.c
DEPPATH += --dep-path $(makefile_path)/
VPATH += :$(makefile_path)/
CFLAGS += "-I$(makefile_path)/"
ifeq ($(OS),Windows_NT)
#SDL2
CFLAGS += "-ISDL2\i686-w64-mingw32\include" -MMD -MP
endif
OBJEXT := .o
AOBJS = $(addprefix $(OBJ_DIR),$(ASRCS:.S=$(OBJEXT)))
COBJS = $(addprefix $(OBJ_DIR),$(CSRCS:.c=$(OBJEXT)))
DEPS = $(addprefix $(OBJ_DIR),$(CSRCS:.c=.d))
GEN_AOBJS = $(addprefix $(GEN_OBJ_DIR),$(GEN_ASRCS:.S=$(OBJEXT)))
GEN_COBJS = $(addprefix $(GEN_OBJ_DIR),$(GEN_CSRCS:.c=$(OBJEXT)))
DEPS += $(addprefix $(GEN_OBJ_DIR),$(GEN_CSRCS:.c=.d))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
GEN_SRCS = $(GEN_ASRCS) $(GEN_CSRCS)
GEN_OBJS = $(GEN_AOBJS) $(GEN_COBJS)
.PHONY: all env clean default cp_lib clean_gen run
ifeq ($(OS),Windows_NT)
all: env default cp_lib
else
all: env default
endif
# monitor header files
-include $(DEPS)
ifeq ($(OS),Windows_NT)
env:
@if not exist "build/bin" $(MKDIR_P) "build/bin"
@if not exist "build/object/generated" $(MKDIR_P) "build/object/generated"
else
env:
@if [ ! -d "build/bin" ]; then $(MKDIR_P) build/bin; fi
@if [ ! -d "build/object/generated" ]; then $(MKDIR_P) build/object/generated; fi
endif
$(OBJ_DIR)main.o: main.c
@echo "Compiling $(makefile_path)/$<"
@$(CC) $(CFLAGS) -c $< -o $@
$(OBJ_DIR)%.o: %.c
@echo "Compiling $<"
@$(CC) $(CFLAGS) -c $< -o $@
$(GEN_OBJ_DIR)%.o: %.c
@echo "Compiling $<"
@$(CC) $(CFLAGS) -c $< -o $@
default: $(OBJS) $(GEN_OBJS)
@echo "Linking $(SIMULATOR_EXE)"
@$(CC) -o $(BIN_DIR)$(SIMULATOR_EXE) $(OBJS) $(GEN_OBJS) $(LDFLAGS)
cp_lib:
-@cp SDL2/lib/SDL2.dll build/bin/SDL2.dll $(NORMAL_OUT)>$(NULL_OUT)
-@cp SDL2/lib/libopenh264.dll build/bin/libopenh264.dll $(NORMAL_OUT)>$(NULL_OUT)
clean:
-@$(RMDIR) build
gen_images := $(wildcard $(PRJ_DIR)/generated/images/*.c)
gen_srcs := $(gen_images) $(wildcard $(PRJ_DIR)/generated/*.c) $(wildcard $(PRJ_DIR)/generated/*.h)
ifeq ($(OS),Windows_NT)
clean_gen_img:
-@rm $(gen_images)
clean_gen: clean_gen_img
-@rm $(gen_srcs)
run:
build\bin\simulator.exe
else
clean_gen_img:
$(RM) $(LVGL_DIR)/generated/images/*.c
clean_gen: clean_gen_img
$(RM) $(LVGL_DIR)/generated/*.c
$(RM) $(LVGL_DIR)/generated/*.h
endif
from lv_port_linux.
编译Makefile时报错:
In file included from main.c:11:
generated/gui_guider.h:13:10: fatal error: lvgl.h: 没有那个文件或目录
13 | #include "lvgl.h"
| ^~~~~~~~
compilation terminated.
Makefile:
PRJ_DIR := $(makefile_path)/..
LVGL_DIR := $(PRJ_DIR)
SIMULATOR_DIR := $(makefile_path)
LVGL_DIR_NAME ?= lvgl
CFLAGS += -I$(LVGL_DIR)/$(LVGL_DIR_NAME)/
I think and adding CFLAGS contains "lvgl/lvgl.h",why?still con't fine 13 | #include "lvgl.h"
| ^~~~~~~~
from lv_port_linux.
Related Issues (20)
- Revision needed - Embedded GUI Using Linux Frame Buffer Device with LVGL HOT 22
- how do i run this repo HOT 7
- Compilation fails with Clang 15 HOT 1
- Alpha Blending in Wayland HOT 4
- Using 3rd-party lib qr-code shows "undefined reference"-error HOT 6
- Run on Raspberry pi zero but get two same contents in one frame HOT 1
- when I add the code in my linux systerm and cross compile , errors HOT 2
- sos HOT 1
- how can I run this project on my ubuntu computer? HOT 2
- Makefile HOT 1
- unable to open evdev interface:: No such file or directory HOT 3
- evdev_read callback denies non-zero ABS_MT_TRACKING_ID in touchscreen. HOT 3
- Error during make HOT 5
- exclude binaries from source code ! HOT 1
- How do use touch in v9? HOT 4
- Some bug-like issues HOT 11
- Documentation : cross compilation for arm HOT 41
- How to implement a right-angled box through lv_obj HOT 1
- SDL2、Libdrm_LIBRARY HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_port_linux.