Hi all,

to further the explore how to compile C-based Lucy extensions, I simply went ahead and set up a simple dummy extension outside of the Lucy source tree. The first step of the build process is to generate C headers from the .cfh Clownfish header files. I reused the relevant parts of Lucy::Build for my extension and quickly ran into a problem.

Like a typical extension, my dummy extension subclassed a Lucy core class. So the Clownfish compiler tried to find the definition of the parent class and its ancestors. This broke down because the .cfh files of those Lucy core classes hadn't been loaded.

I'm only starting to understand the details of Clownfish, but it seems to me that there's no way around installing all the .cfh files to make subclassing work in extensions. Thinking further, we could do away with installing the auto-generated C headers, and regenerate them from the .cfh files when building an extension. The Clownfish headers are also much smaller: 600 KB compared to 4 MB for the C headers.

So is there any compelling reason to install C headers at all?

Nick

Reply via email to