fltkhs
fltkhs copied to clipboard
Why not use cabal to build and link the C-wrapper
Cabal is perfectly capable of building C/C++ files and can link them with the fltkhs
library. Perhaps the custom Setup.hs
isn't needed then.
The original goal was to release the c-bindings seperately. If you look in the c-examples
directory, for instance, there are a number of pure C demos. It might be worth revisiting, let me think about it. Is this so users don't need to install autotools
?
You can always have a separate build for the C-wrapper if you wanted to create a library, but for a haskell library, it is much easier to have it directly link the object files. Now the autoconf is looking for C compilers, but GHC knows those.
That's a great point. I think it's probably time to do that. I'm working on other things at the moment and since we already have a decent install story I'm inclined to put it on the back burner. Feel free send a PR if you need it immediately.
BTW I don't know if you noticed but I released a new version where the user can override the event handlers and drawing functions with Haskell functions of almost all the widgets. Before it was only a few.