Skip to content

undefined symbol: MapViewOfFile2 #22040

@zux0x3a

Description

@zux0x3a

Zig Version

0.13.0

Steps to Reproduce and Observed Output

it seems MapViewOfFile2 is not declared or linked into Zig code base yet, currently i am declaring it externally :

pub extern "kernel32" fn MapViewOfFile2(
    FileMappingHandle: HANDLE,
    ProcessHandle: HANDLE,
    Offset: u64, 
    BaseAddress: ?*anyopaque, 
    ViewSize: usize, // SIZE_T
    AllocationType: u32, // ULONG
    PageProtection: u32, // ULONG
) callconv(WINAPI) ?*anyopaque; 

raising the following linking error :

error: warning(link): unexpected LLD stderr:
lld-link: warning: undefined symbol: MapViewOfFile2

any alternative solution? if we imported the C headeand then call it from it's name space should be a temporary solution?

Expected Output

error: warning(link): unexpected LLD stderr:
lld-link: warning: undefined symbol: MapViewOfFile2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.libcIssues related to libzigc and Zig's vendored libc code.upstreamAn issue with a third party project that Zig uses.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions