Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译出错 #1

Open
ggxxgxxgg opened this issue Jun 12, 2024 · 7 comments
Open

编译出错 #1

ggxxgxxgg opened this issue Jun 12, 2024 · 7 comments

Comments

@ggxxgxxgg
Copy link

image
编译的时候不在dependences下添加spdlog不会报错,添加进去就会出现如上所示的错误

@Forairaaaaa
Copy link
Owner

是宏定义冲突吗

@ggxxgxxgg
Copy link
Author

是宏定义冲突吗

编译输出如下

[main] 正在生成文件夹: LGFX_Simulator_SDL 
[build] 正在启动生成
[proc] 执行命令: C:\software\CMake\bin\cmake.EXE --build c:/Users/82432/Desktop/LGFX_Simulator_SDL/build --config MinSizeRel --target all -j 10 --
[build] [ 19%] Built target smooth_ui_toolkit
[build] [ 26%] Built target mooncake
[build] [ 28%] Built target app_manager_basic
[build] [ 30%] Built target simplekv_test
[build] [ 31%] Building CXX object user/CMakeFiles/user.dir/simu_project/hal/hal.cpp.obj
[build] [ 34%] Built target input_device_register_test
[build] [ 36%] Built target app_register_test
[build] [ 38%] Built target mooncake_framework_test
[build] [ 40%] Built target app_user_data_test
[build] [ 42%] Built target mooncake_basic
[build] In file included from D:/software/mingw64/x86_64-w64-mingw32/include/windows.h:74,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/windows_include.h:11,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os-inl.h:28,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os.h:121,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg-inl.h:10,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg.h:36,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/logger.h:18,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry-inl.h:12,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry.h:122,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/spdlog/include/spdlog/spdlog.h:13,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/mooncake.h:24,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\simu_project\hal\hal.cpp:11:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:37:7: error: expected identifier before numeric constant
[build]        DOUBLE_CLICK = 0x0B,
[build]        ^~~~~~~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:37:7: error: expected '}' before numeric constant
[build] In file included from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1_init.hpp:60,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/LovyanGFX.hpp:31,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1_autodetect/common.hpp:24,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/LGFX_AUTODETECT.hpp:20,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\simu_project\hal\hal.h:14,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\simu_project\hal\hal.cpp:12:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:30:25: note: to match this '{'
[build]      enum CS816S_GESTURE {
[build]                          ^
[build] In file included from D:/software/mingw64/x86_64-w64-mingw32/include/windows.h:74,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/windows_include.h:11,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os-inl.h:28,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os.h:121,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg-inl.h:10,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg.h:36,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/logger.h:18,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry-inl.h:12,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry.h:122,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/spdlog/include/spdlog/spdlog.h:13,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/mooncake.h:24,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\simu_project\hal\hal.cpp:11:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:37:7: error: expected unqualified-id before numeric constant
[build]        DOUBLE_CLICK = 0x0B,
[build]        ^~~~~~~~~~~~
[build] In file included from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1_init.hpp:60,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/LovyanGFX.hpp:31,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1_autodetect/common.hpp:24,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/LGFX_AUTODETECT.hpp:20,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\simu_project\hal\hal.h:14,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\simu_project\hal\hal.cpp:12:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:41:19: error: expected unqualified-id before 'void'
[build]      Touch_CST816S(void)
[build]                    ^~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:41:19: error: expected ')' before 'void'
[build]      Touch_CST816S(void)
[build]                   ~^~~~
[build]                    )
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:57:3: error: expected unqualified-id before 'private'
[build]    private:
[build]    ^~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:72:1: error: expected declaration before '}' token
[build]  }
[build]  ^
[build] mingw32-make.exe[2]: *** [user\CMakeFiles\user.dir\build.make:211: user/CMakeFiles/user.dir/simu_project/hal/hal.cpp.obj] Error 1
[build] mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:457: user/CMakeFiles/user.dir/all] Error 2
[build] mingw32-make.exe: *** [Makefile:90: all] Error 2
[proc] 命令“C:\software\CMake\bin\cmake.EXE --build c:/Users/82432/Desktop/LGFX_Simulator_SDL/build --config MinSizeRel --target all -j 10 --”已退出,代码为 2
[driver] 生成完毕: 00:00:04.980
[build] 生成已完成,退出代码为 2

@ggxxgxxgg
Copy link
Author

生成其他的就不会报这个错误
image

@Forairaaaaa
Copy link
Owner

欸,添加spdlog是怎么个添加法

@ggxxgxxgg
Copy link
Author

克隆项目
image
首次编译会提示没有smooth_ui_toolkit,再克隆smooth_ui_toolkit到文件夹下
image
添加库SDL,并修改CMakeLists.txt
image

# See how to install sdl2: https://wiki.libsdl.org/SDL2/Installation
cmake_minimum_required (VERSION 3.8)
project(LGFX_SDL)

add_definitions(-DLGFX_SDL)


# Simu project
file(GLOB_RECURSE SIMU_PROJECT_SRCS
    simu_project/core_test/*.c
    simu_project/core_test/*.cpp
    simu_project/widget_test/*.c
    simu_project/widget_test/*.cpp
    simu_project/hal/hal_simulator/*.c
    simu_project/hal/hal_simulator/*.cpp
)
set(SIMU_PROJECT_SRCS_EXTRA
    simu_project/simu_project.cpp
    simu_project/hal/hal.cpp
    simu_project/hal/lgfx_fx/lgfx_fx.cpp
)

# Mooncake 
add_subdirectory("dependencies/mooncake")

# Smooth ui toolkit 
add_subdirectory("dependencies/smooth_ui_toolkit")

# ビルド対象にするファイルを指定する;
# LovyanGFXのあるパスと位置関係を変えた場合は相対パス記述を環境に合わせて調整すること;
file(GLOB Target_Files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS 
    *.cpp
    dependencies/LovyanGFX/src/lgfx/Fonts/efont/*.c
    dependencies/LovyanGFX/src/lgfx/Fonts/IPA/*.c
    dependencies/LovyanGFX/src/lgfx/utility/*.c
    dependencies/LovyanGFX/src/lgfx/v1/*.cpp
    dependencies/LovyanGFX/src/lgfx/v1/misc/*.cpp
    dependencies/LovyanGFX/src/lgfx/v1/panel/Panel_Device.cpp
    dependencies/LovyanGFX/src/lgfx/v1/panel/Panel_FrameBufferBase.cpp
    dependencies/LovyanGFX/src/lgfx/v1/platforms/sdl/*.cpp
    )
add_executable (LGFX_SDL ${Target_Files} ${SIMU_PROJECT_SRCS} ${SIMU_PROJECT_SRCS_EXTRA})

# includeするファイルのパスを指定する;
# LovyanGFXのあるパスと位置関係を変えた場合は相対パス記述を環境に合わせて調整すること;
target_include_directories(LGFX_SDL PUBLIC "dependencies/LovyanGFX/src/")

IF (CMAKE_SYSTEM_NAME MATCHES "Linux")

# Linux環境の場合;
# SDL2_INCLUDE_DIRS と SDL2_LIBRARIES を事前に設定しておく;
    find_package(SDL2 REQUIRED SDL2)
    include_directories(${SDL2_INCLUDE_DIRS})
    target_link_libraries(LGFX_SDL -lpthread ${SDL2_LIBRARIES} mooncake smooth_ui_toolkit)

ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")

# 声明一个变量SDL2_DIR为SDL2安装路径
set(SDL2_DIR "./lib/SDL2-2.30.3/x86_64-w64-mingw32")
# 设置要包含的头文件的路径
include_directories(${SDL2_DIR}/include)
# 设置要关联的库的路径
link_directories(${SDL2_DIR}/bin)

target_link_libraries(LGFX_SDL mingw32 SDL2main SDL2 mooncake smooth_ui_toolkit)

    add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
    add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
    add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>")

ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")

# MacOS(Darwin)環境の場合;
    find_package(SDL2 REQUIRED COMPONENTS SDL2)
    target_link_libraries(LGFX_SDL PRIVATE SDL2::SDL2 mooncake smooth_ui_toolkit)

ENDIF ()

target_compile_features(LGFX_SDL PUBLIC cxx_std_17)

报错如下

[main] 正在生成文件夹: smooth_ui_toolkit_simu 
[build] 正在启动生成
[proc] 执行命令: C:\software\CMake\bin\cmake.EXE --build d:/github/c++/smooth_ui_toolkit_simu/build --config Debug --target all -j 10 --
[build] [ 23%] Built target smooth_ui_toolkit
[build] [ 32%] Built target mooncake
[build] [ 34%] Built target app_manager_basic
[build] [ 37%] Built target app_register_test
[build] [ 39%] Built target input_device_register_test
[build] [ 42%] Built target simplekv_test
[build] [ 44%] Built target app_user_data_test
[build] [ 47%] Built target mooncake_framework_test
[build] [ 50%] Built target mooncake_basic
[build] [ 51%] Building CXX object CMakeFiles/LGFX_SDL.dir/LGFX_SDL.cpp.obj
[build] [ 52%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/Fonts/IPA/lgfx_font_japan.c.obj
[build] [ 53%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/Fonts/efont/lgfx_efont_cn.c.obj
[build] [ 55%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/Fonts/efont/lgfx_efont_ja.c.obj
[build] [ 57%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/Fonts/efont/lgfx_efont_kr.c.obj
[build] [ 57%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/Fonts/efont/lgfx_efont_tw.c.obj
[build] [ 58%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/utility/lgfx_qoi.c.obj
[build] [ 60%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/utility/lgfx_qrcode.c.obj
[build] [ 62%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/utility/lgfx_pngle.c.obj
[build] [ 62%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/utility/lgfx_tjpgd.c.obj
[build] [ 64%] Building C object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/utility/miniz.c.obj
[build] [ 65%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/LGFXBase.cpp.obj
[build] [ 66%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/LGFX_Button.cpp.obj
[build] [ 67%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/LGFX_Sprite.cpp.obj
[build] [ 69%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/lgfx_fonts.cpp.obj
[build] [ 70%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/misc/DividedFrameBuffer.cpp.obj
[build] [ 71%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/misc/SpriteBuffer.cpp.obj
[build] [ 73%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/misc/common_function.cpp.obj
[build] [ 74%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/misc/pixelcopy.cpp.obj
[build] [ 75%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/panel/Panel_Device.cpp.obj
[build] [ 76%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/panel/Panel_FrameBufferBase.cpp.obj
[build] [ 78%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/platforms/sdl/Panel_sdl.cpp.obj
[build] [ 79%] Building CXX object CMakeFiles/LGFX_SDL.dir/dependencies/LovyanGFX/src/lgfx/v1/platforms/sdl/common.cpp.obj
[build] [ 80%] Building CXX object CMakeFiles/LGFX_SDL.dir/main.cpp.obj
[build] [ 82%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/draw_line_test.cpp.obj
[build] [ 83%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/easing_path_test.cpp.obj
[build] [ 84%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/ring_buffer_test.cpp.obj
[build] [ 85%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/smooth_color_test.cpp.obj
[build] [ 87%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/smooth_drag_test.cpp.obj
[build] [ 88%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/smooth_line_chat_test.cpp.obj
[build] [ 89%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/transition_2d_test.cpp.obj
[build] [ 91%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/core_test/transition_test.cpp.obj
[build] [ 92%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/widget_test/base_test.cpp.obj
[build] [ 93%] Building CXX object CMakeFiles/LGFX_SDL.dir/simu_project/widget_test/select_menu_option.cpp.obj
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:25:10: error: 'void WidgetTest_1::onUpdate(const TimeSize_t&)' marked 'override', but does not override
[build]      void onUpdate(const TimeSize_t& currentTime) override { spdlog::info("1 update"); }
[build]           ^~~~~~~~
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:34:10: error: 'void WidgetTest_2::onUpdate(const TimeSize_t&)' marked 'override', but does not override
[build]      void onUpdate(const TimeSize_t& currentTime) override { spdlog::info("2 update"); }
[build]           ^~~~~~~~
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:43:10: error: 'void WidgetTest_3::onUpdate(const TimeSize_t&)' marked 'override', but does not override
[build]      void onUpdate(const TimeSize_t& currentTime) override { spdlog::info("3 update"); }
[build]           ^~~~~~~~
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp: In function 'void smooth_widget_base_test()':
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:71:34: error: no matching function for call to 'SmoothUIToolKit::Widgets::WidgetBase::update(long unsigned int)'
[build]          root.update(HAL::Millis());
[build]                                   ^
[build] In file included from D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/smooth_ui_toolkit.h:28,
[build]                  from D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:15:
[build] D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/widgets/base/base.h:152:26: note: candidate: 'virtual void SmoothUIToolKit::Widgets::WidgetBase::update()'
[build]              virtual void update(void);
[build]                           ^~~~~~
[build] D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/widgets/base/base.h:152:26: note:   candidate expects 0 arguments, 1 provided
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:75:34: error: no matching function for call to 'SmoothUIToolKit::Widgets::WidgetBase::update(long unsigned int)'
[build]          root.update(HAL::Millis());
[build]                                   ^
[build] In file included from D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/smooth_ui_toolkit.h:28,
[build]                  from D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:15:
[build] D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/widgets/base/base.h:152:26: note: candidate: 'virtual void SmoothUIToolKit::Widgets::WidgetBase::update()'
[build]              virtual void update(void);
[build]                           ^~~~~~
[build] D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/widgets/base/base.h:152:26: note:   candidate expects 0 arguments, 1 provided
[build] D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:79:34: error: no matching function for call to 'SmoothUIToolKit::Widgets::WidgetBase::update(long unsigned int)'
[build]          root.update(HAL::Millis());
[build]                                   ^
[build] In file included from D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/smooth_ui_toolkit.h:28,
[build]                  from D:\github\c++\smooth_ui_toolkit_simu\simu_project\widget_test\base_test.cpp:15:
[build] D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/widgets/base/base.h:152:26: note: candidate: 'virtual void SmoothUIToolKit::Widgets::WidgetBase::update()'
[build]              virtual void update(void);
[build]                           ^~~~~~
[build] D:/github/c++/smooth_ui_toolkit_simu/dependencies/smooth_ui_toolkit/src/widgets/base/base.h:152:26: note:   candidate expects 0 arguments, 1 provided
[build] mingw32-make.exe[2]: *** [CMakeFiles\LGFX_SDL.dir\build.make:556: CMakeFiles/LGFX_SDL.dir/simu_project/widget_test/base_test.cpp.obj] Error 1
[build] mingw32-make.exe[2]: *** Waiting for unfinished jobs....
[build] mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:178: CMakeFiles/LGFX_SDL.dir/all] Error 2
[build] mingw32-make.exe: *** [Makefile:90: all] Error 2
[proc] 命令“C:\software\CMake\bin\cmake.EXE --build d:/github/c++/smooth_ui_toolkit_simu/build --config Debug --target all -j 10 --”已退出,代码为 2
[driver] 生成完毕: 00:00:31.627
[build] 生成已完成,退出代码为 2

@Forairaaaaa
Copy link
Owner

这个工程试试

@ggxxgxxgg
Copy link
Author

clone下来都可以使用,但是添加smooth_ui_toolkit_simu/simu_project进去就会报错。
我在主页上传了工程可以看看吗,这里

[main] 正在生成文件夹: LGFX_Simulator_SDL 
[main] 正在配置项目: LGFX_Simulator_SDL 
[proc] 执行命令: C:\software\CMake\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=MinSizeRel -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=D:\software\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\software\mingw64\bin\g++.exe -SC:/Users/82432/Desktop/LGFX_Simulator_SDL -Bc:/Users/82432/Desktop/LGFX_Simulator_SDL/build -G "MinGW Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 8.1.0
[cmake] -- The CXX compiler identification is GNU 8.1.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: D:/software/mingw64/bin/gcc.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: D:/software/mingw64/bin/g++.exe - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Configuring done (1.2s)
[cmake] -- Generating done (0.2s)
[cmake] -- Build files have been written to: C:/Users/82432/Desktop/LGFX_Simulator_SDL/build
[build] 正在启动生成
[proc] 执行命令: chcp
[proc] 执行命令: C:\software\CMake\bin\cmake.EXE --build c:/Users/82432/Desktop/LGFX_Simulator_SDL/build --config MinSizeRel --target user -j 10 --
[build] [ 50%] Building CXX object user/CMakeFiles/user.dir/simu_project.cpp.obj
[build] [ 50%] Building CXX object user/CMakeFiles/user.dir/hal/hal.cpp.obj
[build] [ 75%] Building CXX object user/CMakeFiles/user.dir/hal/lgfx_fx/lgfx_fx.cpp.obj
[build] In file included from D:/software/mingw64/x86_64-w64-mingw32/include/windows.h:74,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/windows_include.h:11,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os-inl.h:28,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os.h:121,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg-inl.h:10,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg.h:36,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/logger.h:18,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry-inl.h:12,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry.h:122,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/spdlog/include/spdlog/spdlog.h:13,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/mooncake.h:24,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\hal\hal.cpp:11:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:37:7: error: expected identifier before numeric constant
[build]        DOUBLE_CLICK = 0x0B,
[build]        ^~~~~~~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:37:7: error: expected '}' before numeric constant
[build] In file included from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1_init.hpp:60,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/LovyanGFX.hpp:31,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\hal\hal.h:16,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\hal\hal.cpp:12:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:30:25: note: to match this '{'
[build]      enum CS816S_GESTURE {
[build]                          ^
[build] In file included from D:/software/mingw64/x86_64-w64-mingw32/include/windows.h:74,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/windows_include.h:11,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os-inl.h:28,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/os.h:121,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg-inl.h:10,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/log_msg.h:36,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/logger.h:18,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry-inl.h:12,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/spdlog/include/spdlog/details/registry.h:122,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/spdlog/include/spdlog/spdlog.h:13,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/mooncake/src/mooncake.h:24,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\hal\hal.cpp:11:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:37:7: error: expected unqualified-id before numeric constant
[build]        DOUBLE_CLICK = 0x0B,
[build]        ^~~~~~~~~~~~
[build] In file included from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1_init.hpp:60,
[build]                  from C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/LovyanGFX.hpp:31,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\hal\hal.h:16,
[build]                  from C:\Users\82432\Desktop\LGFX_Simulator_SDL\user\hal\hal.cpp:12:
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:41:19: error: expected unqualified-id before 'void'
[build]      Touch_CST816S(void)
[build]                    ^~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:41:19: error: expected ')' before 'void'
[build]      Touch_CST816S(void)
[build]                   ~^~~~
[build]                    )
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:50:21: error: virt-specifiers in 'init' not allowed outside a class definition
[build]      bool init(void) override;
[build]                      ^~~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:52:23: error: virt-specifiers in 'wakeup' not allowed outside a class definition
[build]      void wakeup(void) override {};
[build]                        ^~~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:53:22: error: virt-specifiers in 'sleep' not allowed outside a class definition
[build]      void sleep(void) override {};
[build]                       ^~~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:55:69: error: virt-specifiers in 'getTouchRaw' not allowed outside a class definition
[build]      uint_fast8_t getTouchRaw(touch_point_t* tp, uint_fast8_t count) override;
[build]                                                                      ^~~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:57:3: error: expected unqualified-id before 'private'
[build]    private:
[build]    ^~~~~~~
[build] C:/Users/82432/Desktop/LGFX_Simulator_SDL/lib/LovyanGFX/src/lgfx/v1/touch/Touch_CST816S.hpp:74:1: error: expected declaration before '}' token
[build]  }
[build]  ^
[build] mingw32-make.exe[3]: *** [user\CMakeFiles\user.dir\build.make:91: user/CMakeFiles/user.dir/hal/hal.cpp.obj] Error 1
[build] mingw32-make.exe[3]: *** Waiting for unfinished jobs....
[build] mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:457: user/CMakeFiles/user.dir/all] Error 2
[build] mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:464: user/CMakeFiles/user.dir/rule] Error 2
[build] mingw32-make.exe: *** [Makefile:254: user] Error 2
[proc] 命令“C:\software\CMake\bin\cmake.EXE --build c:/Users/82432/Desktop/LGFX_Simulator_SDL/build --config MinSizeRel --target user -j 10 --”已退出,代码为 2
[driver] 生成完毕: 00:00:08.879
[build] 生成已完成,退出代码为 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants