Giter Site home page Giter Site logo

Comments (4)

anaanook avatar anaanook commented on May 14, 2024

Just for the record, I am able to get things working by manually building and linking raylib, but it would seem that something isn't quite functioning with the automated build.

from raylib-zig.

Not-Nik avatar Not-Nik commented on May 14, 2024

I don't have a Windows system to test and debug this, but from what I can see this seems to be a zig cc error. Can you try creating a zig build script only for GLFW? If the issue persists when only building that, please create an issue over in the zig repo.

from raylib-zig.

anaanook avatar anaanook commented on May 14, 2024

Hey I've got an update here.. so as it turns out the reason its not working is that the default target on windows is set to "-target native-native-msvc". If you set the target to "-target native-native-gnu" it builds just fine.
Here's what I added to the build file, I'm still pretty green with this stuff... so forgive me if there's a better way of setting this up:

pub fn build(b: *Builder) void {
    const mode = b.standardReleaseOptions();
    const target = b.standardTargetOptions(.{.default_target = .{ .abi=.gnu}});

and then down in the examples

    for (examples) |ex| {
        const exe = b.addExecutable(ex.name, ex.path);
        exe.setBuildMode(mode);
        exe.setTarget(target);

I got the idea from this suggestion: ziglang/zig#6565 , apparently this default target causes other issues too.

from raylib-zig.

andrewrk avatar andrewrk commented on May 14, 2024

ziglang/zig#6565 is solved now; the workaround will not be necessary in the upcoming 0.8.0 release.

from raylib-zig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.