-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
bugSomething isn't workingSomething isn't working
Description
问题描述 在 Linux 环境下构建项目时编译失败。原因是生成的可执行文件名称 (SmartMealPro) 与现有的源码目录 src/SmartMealPro 重名,导致冲突。
错误日志
:-1: cannot open output file src/SmartMealPro: Is a directory
截图
解决方案 可以通过在 CMakeLists.txt 中分离运行时输出目录来修复此问题。
添加以下配置即可解决:
# 针对 Linux 构建的修复:将二进制文件输出到单独的 'bin' 目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working