On Thursday, 12 July 2012 at 16:43:28 UTC, mta`chrono wrote:
Am 12.07.2012 08:17, schrieb Jacob Carlborg:
On 2012-07-12 01:50, cal wrote:

Hmm, looking at the .c header, the function is not even defined. I think it is not used, and in this case turning macros into functions in the binding generates linker errors. I don't know the best way to fix this in the binding (I have simply commented out the functions in my repo, as
they don't seem to be used). But its worth noting.

If a macro is turned into a function it needs to have an implementation.


when marcos are turned into functions they introduce new symbols. it's a pity, but in that case you have to link to deimos. so deimos will become
a wrapper rather than a binding.

I compile the deimos bindings along with my own code, so that's not a problem.

The function in question was actually proto'd as an extern, so it was expecting another library to resolve it. The original C header did not even define the function (whereas the binding does, but as an extern dependency) so it would appear that the macro was/is never used, otherwise using the .c header would introduce an undefined function. I guess macros can introduce undefined symbols as long as they are never used, but the same is only true for .d bindings if they are introduced as templates like David said.

Reply via email to