Skip to content

Variadic functions not accepted for cdecl #40244

@retep998

Description

@retep998

Despite cdecl being equivalent to C on Windows, Rust insists that I specify C and not cdecl for variadic functions.

error[E0045]: variadic function must have C calling convention
   --> src\um\shellapi.rs:815:5
    |
815 |       pub fn ShellMessageBoxA(
    |  _____^ starting here...
816 | |         hAppInst: HINSTANCE,
817 | |         hWnd: HWND,
818 | |         lpcText: LPCSTR,
819 | |         lpcTitle: LPCSTR,
820 | |         fuStyle: UINT,
821 | |         ...
822 | |     ) -> c_int;
    | |_______________^ ...ending here: variadics require C calling conventions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions