Repository navigation
Troubleshooting
[build] interface.swift:273:41: error: cannot convert value of type 'Int32' to expected argument type 'boolean_t' (aka 'UInt32')
[build] CGAssociateMouseAndMouseCursorPosition(Int32(1))
[build] ^
[build] boolean_t( )
[build] make[3]: *** [interface.o] Error 1
[build] make[2]: *** [CMakeFiles/build_minilibx] Error 2
[build] make[1]: *** [CMakeFiles/build_minilibx.dir/all] Error 2This error occurs because the declaration of the boolean_t type is different in the m1(Int32)and the x86(UInt32)
Fix
We added branches in interface.swift to run different code depending on the architecture.
#if arch(arm64)
CGAssociateMouseAndMouseCursorPosition(Int32(1)) // for arm_64
#else
CGAssociateMouseAndMouseCursorPosition(UInt32(1)) // for x86_64
#endif