Can not use a structure in an Import
All bugs related to new C backend
Can not use a structure in an Import
I had this 'bug' in macOS:
viewtopic.php?t=87191
Now I stumpled across the same error when I use the C backend (x86) in windows:
viewtopic.php?t=87191
Now I stumpled across the same error when I use the C backend (x86) in windows:
More is not visible in the Assembler error message requester.error: unkonw type_name 's_pjsip_cfg_t'
136 | extern s_pjsip_cfg_t v_pjsip_sip_cfg_var asm("_pjsip_sip_cfg_var");
purebasic.c in function 'f_startsipstack':
purebasic.c46167:20: error: request for member 'f_disable_tcp_swi
- Fred
- Administrator
Administrator - Posts: 18344
- Joined: Fri May 17, 2002 4:39 pm
- Location: France
- Contact:
Re: Can not use a structure in an Import
Did you try with 6.30b3 ? I tried here with x86 and x64 on Windows and it seems to work
Code: Select all
Macro pj_bool_t : i : EndMacro
Structure pjsip_cfg_t Align #PB_Structure_AlignC
allow_port_in_fromto_hdr.pj_bool_t
accept_replace_in_early_state.pj_bool_t
allow_tx_hash_in_uri.pj_bool_t
disable_rport.pj_bool_t
disable_tcp_switch.pj_bool_t
disable_tls_switch.pj_bool_t
follow_early_media_fork.pj_bool_t
req_has_via_alias.pj_bool_t
resolve_hostname_to_get_interface.pj_bool_t
disable_secure_dlg_check.pj_bool_t
use_compact_form.pj_bool_t
accept_multiple_sdp_answers.pj_bool_t
keep_inv_after_tsx_timeout.pj_bool_t
EndStructure
ImportC ""
pjsip_sip_cfg_var.pjsip_cfg_t
EndImport
a = pjsip_sip_cfg_varRe: Can not use a structure in an Import
I just tried 6.30b3 x86 C backend,
but I can not compile the project because:
Declare and Procedure are identical :shock:
In 6.21 it works without this problem.
but I can not compile the project because:
Declare does not fit the real procedure
Code: Select all
Structure Object
Server_ID.i
Network_Thread_ID.i
EndStructure
Prototype.i Prototype_Event_Callback(*Object, *Client, Event.i, *Custom_Structure=#Null)
Declare.i Event_Callback(*Object.Object, *Callback.Prototype_Event_Callback)
Code: Select all
Procedure.i Event_Callback(*Object.Object, *Callback.Prototype_Event_Callback)
In 6.21 it works without this problem.
Last edited by infratec on Fri Oct 10, 2025 1:51 pm, edited 1 time in total.
- Fred
- Administrator
Administrator - Posts: 18344
- Joined: Fri May 17, 2002 4:39 pm
- Location: France
- Contact:
Re: Can not use a structure in an Import
Yes, I corrected this issue for the next beta. viewtopic.php?t=87674
Re: Can not use a structure in an Import
[引用]
drop the pointer or move procedure to where you don't need to declare it and leave the pointer
When I came across it, I suffered a little hair loss from being a dyslexic :lol:
Code: Select all
Declare.i Event_Callback(*Object.Object, Callback.Prototype_Event_Callback)
Procedure.i Event_Callback(*Object.Object, Callback.Prototype_Event_Callback)
Jump to
- PureBasic
- ↳ Coding Questions
- ↳ Game Programming
- ↳ 3D Programming
- ↳ Assembly and C Programming in PureBasic
- ↳ The PureBasic Editor
- ↳ The PureBasic Form Designer
- ↳ General Discussion
- ↳ Feature Requests and Wishlists
- ↳ Tricks 'n' Tips
- Bug Reports
- ↳ Bugs - Windows
- ↳ Bugs - Linux
- ↳ Bugs - Mac OSX
- ↳ Bugs - C backend
- ↳ Bugs - 3D Engine
- ↳ Bugs - IDE
- ↳ Bugs - Documentation
- OS Specific
- ↳ AmigaOS
- ↳ Linux
- ↳ Windows
- ↳ Mac OSX
- ↳ Raspberry PI
- Miscellaneous
- ↳ Announcement
- ↳ Off Topic
- Showcase
- ↳ Applications - Feedback and Discussion
- ↳ PureFORM & JaPBe
- ↳ TailBite