Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: juce_gui_extra.cpp defaults to including web browser ignoring CMake option

未关闭
#1,663 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
cpp
领域
build-system

调研方向

从 modules/juce_gui_extra/juce_gui_extra.h 第 75-77 行开始,这里 JUCE_WEB_BROWSER 的定义与 CMake 的 NEEDS_WEB_BROWSER 选项无关,然后检查 juce_add_gui_app 在 cmake/JUCEUtils.cmake 中如何传递 NEEDS_WEB_BROWSER,以及 modules/juce_gui_extra/juce_gui_extra.cpp 随后引入了什么。判断头文件是否应仅在显式启用时才定义 JUCE_WEB_BROWSER,还是应由 CMake 强制将其设为 0。完成的标准是:一个 NEEDS_WEB_BROWSER 关闭的 juce_add_gui_app 目标能够在没有手动 JUCE_WEB_BROWSER=0 编译定义的情况下构建。

由索引模型根据 Issue 内容生成。

描述

Detailed steps on how to reproduce the bug

When using, for example, juce_add_gui_app() and with the default option of NEEDS_WEB_BROWSER set to false, the following in juce_gui_extra.h causes attempts to import headers in juce_gui_extra.cpp that are then correctly not linked by cmake, causing a build error:
https://github.com/juce-framework/JUCE/blob/3ba67d4585e9d1fbcdb26a877c7978608b1f802e/modules/juce_gui_extra/juce_gui_extra.h#L75-L77

Workaround is to set the compile definition JUCE_WEB_BROWSER=0 but given the default is this already when adding the target, this definition should be set to 0 by default, or the setting of it in that file should be removed so it's only ever explicitly defined when enabled.

What is the expected behaviour?

Builds successfully.

Operating systems

Linux

What versions of the operating systems?

Fedora 44.

Architectures

x86_64

Stacktrace

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct
  • I agree to follow the Code of Conduct
主要语言
C++
星标
8.9k
派生
2.2k
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

juce-framework/JUCE 的其他 Issue

查看 juce-framework/JUCE 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。