Comments (4)
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.
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.
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.
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)
- No Autocomplete For Zig LSP HOT 3
- flags incorrectly converted in the python generator HOT 1
- Error in build.zig HOT 1
- loadFontFromMemory fontChars missing support for NULL
- Apps crash when functions that return arrays, return null pointers HOT 1
- Functions accepting slices sometimes redundantly also take their length
- Implement system-raylib flag HOT 2
- Tips on using with zigmod? HOT 1
- No implementation for adding Vectors ?? HOT 2
- Use OS specific path separators in `build.zig`, and remove comptime parameters in `getModule`. HOT 2
- Color pink is defined wrong
- how do I include other libs (web build) HOT 4
- Getting an error when following readme instruction
- Latest zig development version introduced breaking changes for build.zig HOT 1
- attempting to import both raylib and raylib-math fails HOT 1
- where is raylib built from
- modified build.zig can build it now HOT 3
- Streamlining `build.zig` for easier integration with Zig's Package Manager HOT 3
- Error: Use of undeclared identifier 'L_tmpnam' HOT 2
- Feature request: bindings for Raylib `rlgl` OpenGL abstraction layer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raylib-zig.