Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

Cannot forward-declare struct

Open
#346 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

On gcc 3.x I get `nuklear/nuklear.h:3634: warning: parameter has incomplete type` because of a forward-declaration for `struct nk_style_item` for which it cannot determine the size of. This struct also includes members of type `struct nk_style_item_data` and `struct nk_style_item_type` which also receive the same errors if I do not move all 3 definitions above this line.

Is there a good solution to this problem?

Contributor guide

Open the contributing guide

Research direction

Start at nuklear/nuklear.h:3634 and inspect the declarations of struct nk_style_item, struct nk_style_item_data, and struct nk_style_item_type. Reproduce the warning with the reported GCC 3.x setup if available, then verify that the header compiles without incomplete-type warnings while preserving the existing API.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.