Closed crack-dawn closed 2 months ago
It seems MinGW doesn't really support ASAN. Does it work if you comment out these lines?
By modify the projetc top cmakeList.txt in workplace root folder, I have solved the problem.
/lv_port_pc_vscode (master)
$ tree -L 2
.
|-- CMakeLists.txt
|-- README.html
|-- README.md
|-- bin
| |-- SDL2.dll
| `-- main.exe
|-- build
| |-- CMakeCache.txt
| |-- CMakeFiles
| |-- Makefile
| |-- cmake_install.cmake
| |-- compile_commands.json
| |-- lib
| `-- lvgl
|-- ca.txt
|-- licence.txt
|-- lv_conf.h
|-- lvgl
| |-- CMakeLists.txt
| |-- CMakePresets.json
| |-- Kconfig
| |-- LICENCE.txt
| |-- README.md
| |-- SConscript
| |-- component.mk
| |-- demos
| |-- docs
| |-- env_support
| |-- examples
| |-- idf_component.yml
| |-- library.json
| |-- library.properties
| |-- lv_conf_template.h
| |-- lvgl.h
| |-- lvgl.mk
| |-- lvgl.pc.in
| |-- scripts
| |-- src
| `-- tests
|-- main
| `-- src
|-- simulator.code-workspace
`-- thirdpart
`-- SDL2-devel-2.28.2-mingw
find_package(SDL2 REQUIRED SDL2)
into
set(SDL2_PATH_TOP "${CMAKE_CURRENT_SOURCE_DIR}/thirdpart/SDL2-devel-2.28.2-mingw/SDL2-2.28.2/")
find_package(SDL2 CONFIG HINTS "${SDL2_PATH_TOP}")
# target_compile_options(main PRIVATE -fsanitize=address,leak,undefined) # target_link_options(main PRIVATE -fsanitize=address,leak,undefined)
#include "SDL2/SDL.h"
in main.c
Prompt that the project has been built task completed successfully built , and the sample demo can run normally.
gcc version:build-info.txt
problems:
cmake build logs hinted that: