Skip to content

Releases: shelldivers/minilibx

v1.0.2

Choose a tag to compare

@yhames yhames released this 23 Jul 06:33

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 2

This 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

v1.0.1

Choose a tag to compare

@yhames yhames released this 22 Jul 17:56

Troubleshooting

SwiftDriverExecution/MultiJobExecutor.swift:207: Fatal error: multiple producers for output mlx_image.swiftmodule: Compiling mlx_image mlx_image.swift & Emitting module for mlx_image

This error occurs because the name of the swiftmodule file created with -o and the swiftmodule file created with -emit-module are the same In swiftmodule compilation rules.

Fix

We removed -o $@ options in swiftmodule compilation rules.

  • Before
%.swiftmodule: %.swift
	swiftc $(OPTI) $(INC) -parse-as-library -c $< -o $@ -emit-module -module-name $(patsubst %.swift,%,$<) -module-link-name $(patsubst %.swift,%,$<)
  • After
%.swiftmodule: %.swift
	swiftc $(OPTI) $(INC) -parse-as-library -c $< -emit-module -module-name $(patsubst %.swift,%,$<) -module-link-name $(patsubst %.swift,%,$<)

v1.0.0

Choose a tag to compare

@yhames yhames released this 22 Jul 17:11

minilibx