Comments (8)
I do not understand why the compiler does not grab the available system libraries, which do seem to have to correct symbols in them.
See ziglang/zig#6469
./libs/zgl/c.zig:6:5: error: C import failed @cImport({ ^ ./zig-cache/o/fca946021a1176b5ad82bf37c8570071/cimport.h:1:10: note: 'epoxy/gl.h' file not found #include <epoxy/gl.h> ^ ./libs/zgl/zgl.zig:228:6: error: container '.zgl.c' has no member called 'glClear' c.glClear(@as(types.BitField, if (mask.color) c.GL_COLOR_BUFFER_BIT else 0) |
Do you have libepoxy headers (usually package libepoxy-dev
or smth.) installed on your system?
from zgl.
Yeah. I'm using Arch which has the headers included in the libepoxy
package.
from zgl.
Yeah. I'm using Arch which has the headers included in the
libepoxy
package.
Ok, maybe clearing cache will help you
$ rm -r ~/.cache/zig/ where-project/zig-cache/
from zgl.
Same issue.
Though, explicitly adding exe.addSystemIncludePath("/usr/include/");
gives the error ld.lld: error: unable to find library -lepoxy
. So it does seem that the compiler has trouble finding the lib and header files..?
from zgl.
Try this (and clear cache):
const exe = b.addExecutable("motorsim", "src/main.zig"); exe.setTarget(target); exe.setBuildMode(mode); exe.addPackagePath("glfw", "libs/mach-glfw/src/main.zig"); glfw.link(b, exe, .{}); exe.addPackagePath("zgl", "libs/zgl/zgl.zig"); exe.linkSystemLibrary("dl"); exe.linkSystemLibrary("epoxy"); exe.install();
from zgl.
Same include error.
from zgl.
Same include error.
Try this (and clear cache):
const exe = b.addExecutable("motorsim", "src/main.zig"); exe.addPackagePath("glfw", "libs/mach-glfw/src/main.zig"); glfw.link(b, exe, .{}); exe.addPackagePath("zgl", "libs/zgl/zgl.zig"); exe.linkSystemLibrary("dl"); exe.linkSystemLibrary("epoxy"); exe.setTarget(target); exe.setBuildMode(mode); exe.install();
It works for me without -Dtarget=blabla
etc.
from zgl.
That did it! I had no idea that setTarget
and setBuildMode
are place dependent in the build file??
Thanks!
from zgl.
Related Issues (16)
- Program.uniform1i function name conflict HOT 1
- Types for offsets: usize vs ?usize vs ?*c_void
- Inconsistency between Type and ElementType
- Inability to pass null to bufferData/namedBufferData
- Remove OpenGL-Registry submodule? HOT 1
- Add a version of activeTexture which allows integers HOT 1
- Cannot use createTexture in mac HOT 3
- How do I use it using mach-glfw? HOT 4
- How do I use the new bindings with SDL.zig? HOT 4
- orelse @panic check for each opengl call in release mode?
- SIGSEGV when calling any function HOT 1
- Code won't build with latest 0.11 version of Zig HOT 3
- BufferMapTarget duplicates BufferTarget
- Put emphasis on the "incrementally"
- Instructions of usage and setup 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 zgl.