Skip to content

C error when using C type from lib in function pointer declaration #10

@ArtemkaKun

Description

@ArtemkaKun
C compiler output:
/home/yuart/Projects/spawn/out.c:45:28: error: expected declaration specifiers or ‘...’ before ‘*’ token
   45 | typedef tellusim___Bool_t (*fn_void$ptr$tellusim___Bool_t)(void*);
      |                            ^
/home/yuart/Projects/spawn/out.c:56:9: error: unknown type name ‘fn_void$ptr$tellusim___Bool_t’
   56 | typedef fn_void$ptr$tellusim___Bool_t tellusim___TSWindowMainLoopCallback;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pub type TSWindowMainLoopCallback = fn (data unsafe &void) -> Bool_t

fn_void$ptr$tellusim___Bool_t is present in generated C code, it's just declared below its usage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions