Hi everyone ! I experience troubles with NBExternalStructure in NativeBoost when the structure modeled contains fields with different types. For example, manipulating the following structure poses no problem and I can manipulate the fields correctly:
typedef struct abc_s { double a; double b; double c; } abc; However, setting field 'a' to be an int yields the following symptoms: ¤ From Pharo to C (function with 'abc' as argument type), the fields are badly read. ¤ From C to Pharo (function with 'abc' as return type), the VM crash without an error nor a dump. Am I doing something wrong or is it maybe specific to the compiler I use (the one that comes with Visual Studio Express 2013) ? I'm pretty sure I could go arround this using NBExternalObject and building the structure on C side, but it would be nice to avoid it. On a side note, my understanding is that creating a structure on Pharo side will have it stored in Pharo memory. Is it problematic when it comes to pass it by value ? Or should I manage the copying on the C heap to be safe ? Thomas.