fltkhs icon indicating copy to clipboard operation
fltkhs copied to clipboard

Why not use cabal to build and link the C-wrapper

Open jputcu opened this issue 7 years ago • 3 comments

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.

jputcu avatar Mar 08 '17 13:03 jputcu

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?

deech avatar Mar 08 '17 14:03 deech

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.

jputcu avatar Mar 08 '17 18:03 jputcu

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.

deech avatar Mar 08 '17 19:03 deech