analytech-solutions / CBinding.jl

Automatic C interfacing for Julia
MIT License
132 stars 7 forks source link

Document best practices for including system header files #121

Closed fleimgruber closed 1 year ago

fleimgruber commented 1 year ago

This is related to https://github.com/analytech-solutions/CBinding.jl/issues/109. I realize that it is outside of the scope of CBinding.jl to handle the system compiler environments. Still it would be good to have best practices for e.g. including system headers on Windows:

somewhere in the README. I would be happy to provide this section if you think it is a good idea and we find a good approach to actually do this for Clang_jll, e.g. via env vars, custom Julia startup code, ... what do you think?

fleimgruber commented 1 year ago

Sorry for the noise, I am just now realizing how this section would essentially be a "look into your system docs for setting up the compiler environment".

krrutkow commented 1 year ago

Yes, that is actually similar to what System.jl demonstrates. It shows how to use bindings for the GNU Standard C Library and Linux kernel. Unfortunately, that might not serve as a good example for a Windows environment.