Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,663 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu tại modules/juce_gui_extra/juce_gui_extra.h dòng 75-77, nơi JUCE_WEB_BROWSER được định nghĩa bất kể tùy chọn NEEDS_WEB_BROWSER của CMake, sau đó kiểm tra cách juce_add_gui_app lan truyền NEEDS_WEB_BROWSER trong cmake/JUCEUtils.cmake và những gì modules/juce_gui_extra/juce_gui_extra.cpp tiếp theo kết nối vào. Quyết định xem header chỉ nên định nghĩa JUCE_WEB_BROWSER khi được bật rõ ràng, hay CMake nên ép nó về 0. Xong nghĩa là một target juce_add_gui_app với NEEDS_WEB_BROWSER tắt build được mà không cần macro biên dịch JUCE_WEB_BROWSER=0 thủ công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
C++
Star
8.9k
Fork
2.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của juce-framework/JUCE

Tất cả issue của juce-framework/JUCE

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.