Skip to content

[build] Building with Zig fails with undeclared identifier 'MAX_FILEPATH_LENGTH' #5405

@cryptocode

Description

@cryptocode

Issue description

I'm trying to use raylib master branch as a dependency in a Zig project, but running into an error.

To repro, clone master branch and build directly with Zig 0.15.2 (my repro was done on macOS):

zig build

Output:

raylib/src/rmodels.c:4313:21: error: use of undeclared identifier 'MAX_FILEPATH_LENGTH'
    char currentDir[MAX_FILEPATH_LENGTH] = { 0 };
                    ^
raylib/src/rmodels.c:4314:48: error: use of undeclared identifier 'MAX_FILEPATH_LENGTH'
    strncpy(currentDir, GetWorkingDirectory(), MAX_FILEPATH_LENGTH - 1); // Save current working directory

Environment

macOS aarch64, Zig 0.15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions