Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,663 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp
Domain
build-system

Research direction

Read the referenced lines in modules/juce_gui_extra/juce_gui_extra.h alongside the related includes in juce_gui_extra.cpp, then trace how NEEDS_WEB_BROWSER and JUCE_WEB_BROWSER are set for juce_add_gui_app(). Verify the behavior in a Linux build with the default option. Done means the build succeeds without requiring the workaround JUCE_WEB_BROWSER=0.

Written by the indexing model from the issue text.

Description

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
Dominant language
C++
Stars
8.9k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from juce-framework/JUCE

All issues in juce-framework/JUCE

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.