I have found that it was due to the fact that the library contained a variable that it access. I commented the line that was freeing the memory (which is used on Windows version of the library) and it does work. However, I do have a different problem with the function using
ath_motor_mappings_t& out
I have no idea how to make proper convention for this parameter.
the function is
void Merge( ath_motor_mappings_t a, ath_motor_mappings_t b, ath_motor_mappings_t& out)
I have tried using
typealias Merge = @convention(c) (ath_motor_mappings_t, ath_motor_mappings_t, UnsafeMutablePointer<ath_motor_mappings_t>) -> Void
typealias Merge = @convention(c) (ath_motor_mappings_t, ath_motor_mappings_t, ath_motor_mappings_t) -> Void
but both gives me EXC_BAD_ACCESS error.
is there a convention that can specify reference?
Topic:
Programming Languages
SubTopic:
Swift
Tags: