Can you give the full example file?
For C interop your type should also have the exportc pragma. You might also want to add byref or bycopy to the type to enforce one behavior or the other as by default Nim pass by ref if the struct is more than 3 words on the stack (24 bytes on x86-64) and by value otherwise. And lastly you might also want to enforce cdecl, especially for Microsoft MSVC compiler that may use stdcall calling convention.
