-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sokol #10381
base: master
Are you sure you want to change the base?
Add sokol #10381
Conversation
When else fails, use the search functionality |
That issue is solved, thanks! :) |
Co-authored-by: Mosè Giordano <[email protected]>
Co-authored-by: Mosè Giordano <[email protected]>
@giordano Any idea on the issue that is occurring for Windows and Apple builds? Looks like its the same issue for both 🙃 |
All required builds pass, except rv64 since it lacks a dependency, which I disabled! Should be ready for review now. |
I'm confused by exactly what you are trying to package here. According to the upstream git repo (https://github.com/floooh/sokol), sokol is a header library, meaning it should just be packaging headers that the dependencies include. You seem to be adding a C file that has an empty main function and compiling a shared library - why is this needed? If this is truly just a header only library, then this library just needs to install the headers and have an AllPlatforms tag. |
@imciner2 I share similar concerns so I looked up previous instances of something similar
So I thought building it as a library and wrapping it with Clang.jl is the best way forward.
Windows and Apple demand this :) |
Maybe the question is: what do you want to do exactly with this? |
Generate bindings with Clang.jl and use its functions |
@giordano Given that I want to use the functions from this library in Julia, if not this, what is the best way to do this in your opinion. Although, I looked for something similar in JuliaBinaryWrappers and couldn't find anything similar to my case. There's stb but its simply packaged as headers and I don't see a julia package which uses them or expose them to someone using it to write a Julia library. |
Ok, if you want to actually use these functions in Julia, then you probably do need to compile this into a library. Usually we see header only libraries used as dependencies for other packages instead of from Julia itself. As for the wrapper, it looks more complicated and confusing than it really needs to be. It references emscripten in the CMake, you don't need to give the headers to the target, and also the main function isn't needed (libraries don't have main functions). |
@imciner2 Thanks for the comment! I made some changes accordingly :) |
Currently only compiles on Linux.
Not sure whats the issue on Windows, on Apple I believe the
lld-macos: error: undefined symbol: ___isPlatformVersionAtLeast
issue can be fixed by linking tolibclang_rt.osx
but I'm not sure how to do that... any help would be appreciated!Also, Apple and Windows are having the same issue of undefined reference to
sokol_main
, not sure what that means....