-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile fails for Nuklear #24
Comments
I was actually just testing this. I got a similar error but at a different location in
Strangely , |
I think you could workaround it temporarily by using |
Oh correction. |
Still the same error. |
Shortest reproducer: int a = sizeof(int); And the error:
Which definitely comes from cc, so I opened an issue. For now the workaround is to remove Nuklear still doesn't compile, but with a different error, which deserves a separate issue. |
Additional
Another failure on Next, it makes sense to map Nuklear's define:
- name: stbtt_uint8
value: _cxgo_uint8
- name: stbtt_int8
value: _cxgo_sint8
- name: stbtt_uint16
value: _cxgo_uint16
- name: stbtt_int16
value: _cxgo_sint16
- name: stbtt_uint32
value: _cxgo_uint32
- name: stbtt_int32
value: _cxgo_sint32 There was a bug with missing Next error is related to #define NK_OFFSETOF(st,m) offsetof(st,m)
#define NK_CONTAINER_OF(ptr,type,member)\
(type*)((void*)((char*)(1 ? (ptr): &((type*)1)->member) - NK_OFFSETOF(type, member))) This finally allows cxgo to convert the code, but it then fails on files:
- name: nuklear.c
replace:
- old: 'nk_vec2('
new: 'nk_vec2f('
- old: 'nk_vec2i('
new: 'nk_vec2if('
- old: 'nk_rect('
new: 'nk_rectf('
- old: 'nk_recti('
new: 'nk_rectif('
- old: 'nk_font_baker('
new: 'nk_font_bakerf('
- old: 'nk_font_config('
new: 'nk_font_configf(' At the end there are a few more issues that you'd have to fix on a case-by-case basis (either manually or with I will come back to this later to file issues on Github and eventually fix them. So the config I have at the moment is: package: gonuke
int_size: 8
ptr_size: 8
define:
- name: _MSC_VER
- name: stbtt_uint8
value: _cxgo_uint8
- name: stbtt_int8
value: _cxgo_sint8
- name: stbtt_uint16
value: _cxgo_uint16
- name: stbtt_int16
value: _cxgo_sint16
- name: stbtt_uint32
value: _cxgo_uint32
- name: stbtt_int32
value: _cxgo_sint32
files:
- name: nuklear.c
replace:
- old: 'nk_vec2('
new: 'nk_vec2f('
- old: 'nk_vec2i('
new: 'nk_vec2if('
- old: 'nk_rect('
new: 'nk_rectf('
- old: 'nk_recti('
new: 'nk_rectif('
- old: 'nk_font_baker('
new: 'nk_font_bakerf('
- old: 'nk_font_config('
new: 'nk_font_configf(' |
nuklear.h
is from https://github.com/Immediate-Mode-UI/Nuklear/blob/master/nuklear.hOutput of
cxgo file nuklear.c
The text was updated successfully, but these errors were encountered: