Skip to content

Fix demo compilation when calculator is disabled#20

Merged
jserv merged 1 commit intomainfrom
fix-build
Feb 25, 2026
Merged

Fix demo compilation when calculator is disabled#20
jserv merged 1 commit intomainfrom
fix-build

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Feb 25, 2026

The symbols DEMO_WIN_X, DEMO_WIN_Y, and the forward declaration for get_demo_window_height were previously placed inside the '#ifdef CONFIG_DEMO_CALCULATOR' block in tests/example.c.

When the calculator demo is disabled in Kconfig, these crucial symbols are excluded, causing compilation to fail for all other demos (like clock, vector, nyan cat) that rely on them for window positioning and sizing.

Close #19


Summary by cubic

Fix compilation of non-calculator demos when the calculator is disabled by moving shared window constants and a forward declaration out of the calculator-only block.

  • Bug Fixes
    • Define DEMO_WIN_X/DEMO_WIN_Y and forward declare get_demo_window_height outside CONFIG_DEMO_CALCULATOR.
    • Prevent build failures in clock, vector, and nyan cat demos when CONFIG_DEMO_CALCULATOR=n.

Written for commit 020147c. Summary will update on new commits.

The symbols DEMO_WIN_X, DEMO_WIN_Y, and the forward declaration
for get_demo_window_height were previously placed inside the
'#ifdef CONFIG_DEMO_CALCULATOR' block in tests/example.c.

When the calculator demo is disabled in Kconfig, these crucial
symbols are excluded, causing compilation to fail for all other
demos (like clock, vector, nyan cat) that rely on them for window
positioning and sizing.

Close #19
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@jserv jserv merged commit 0a06dd9 into main Feb 25, 2026
12 checks passed
@jserv jserv deleted the fix-build branch February 25, 2026 01:59
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

Successfully merging this pull request may close these issues.

Demo fail to compile when CONFIG_DEMO_CALCULATOR is disabled

1 participant