Add sokol
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 to libclang_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....
on Apple I believe the lld-macos: error: undefined symbol:
___isPlatformVersionAtLeastissue can be fixed by linking tolibclang_rt.osxbut I'm not sure how to do that... any help would be appreciated!
When else fails, use the search functionality
When else fails, use the search functionality
That issue is solved, thanks! :) All thats left is the undefined reference to sokol_main issue in both Windows and Apple...
@giordano Any idea on the issue that is occurring for Windows and Apple builds? Looks like its the same issue for both :upside_down_face:
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
- I found https://github.com/Gnimuc/STBImage.jl which was doing something similar with https://github.com/Gnimuc/STBImageBuilder/tree/master/src
- I believe the official bindings like https://github.com/floooh/sokol-nim/ do something similar
So I thought building it as a library and wrapping it with Clang.jl is the best way forward.
has an empty main function
Windows and Apple demand this :)
Maybe the question is: what do you want to do exactly with 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. The first example I've posted is doing exactly this I believe. The second one I suspect is doing something similar too, and those are the official bindings from the developer.
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 :)
Merge?