Comments (7)
Could it be related to being a single-file header-only library?
Oh, sorry, I didn't read fully the explanation, I thought it was not working...
from raylib-zig.
Zig allows for setting C defines in the build script, so maybe we could look into that?
from raylib-zig.
Zig allows for setting C defines in the build script, so maybe we could look into that?
I will look into this!
from raylib-zig.
I was successfully able to define RAYGUI_IMPLEMENTATION in build.zig with the following:
exe.defineCMacroRaw("RAYGUI_IMPLEMENTATION");
However, I'm still working on getting the raygui.h to be added in build.zig. The way that raylib is added to the build doesn't seem to apply to a header-only library like raygui.h because I can't invoke raylib.addCSourceFiles
on a .h file. I assumed adding raygui as a static library and adding the include path would be sufficient but it is not and I am getting error: lld-link: undefined symbol: GuiButton
even though I've defined the extern fn in a new zig file and added raygui.h as a static library. This makes me suspect the build isn't parsing the raygui.h file. I will continue to post here as I make progress for posterity.
from raylib-zig.
You probably need to add an extra C file that includes raygui, so the functions actually get compiled
from raylib-zig.
You probably need to add an extra C file that includes raygui, so the functions actually get compiled
I tried this to no avail. I've uploaded a PR with my attempt: https://github.com/Not-Nik/raylib-zig/pull/39/files in case you want to take a look. I'm still working on it and I can tell I'm getting closer but it's just not there yet.
from raylib-zig.
from raylib-zig.
Related Issues (20)
- Doesnt compile HOT 1
- Support for Zig 0.11.x HOT 1
- 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
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.