mattn / go-gtk

Go binding for GTK
http://mattn.github.com/go-gtk
BSD 3-Clause "New" or "Revised" License
2.12k stars 247 forks source link

mac m1 #423

Open zhang19523zhao opened 2 years ago

zhang19523zhao commented 2 years ago

zhanghaodeMacBook-Air:go-gtk root# go get github.com/mattn/go-gtk/gtk

github.com/mattn/go-gtk/pango

ld: warning: ignoring file /opt/homebrew/Cellar/pango/1.50.5/lib/libpango-1.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.70.4/lib/libglib-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.70.4/lib/libgobject-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/opt/gettext/lib/libintl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/harfbuzz/4.0.1/lib/libharfbuzz.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: "_g_object_unref", referenced from: cgo_3aa97d579d37_Cfunc_g_object_unref in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_g_object_unref) "_pango_font_description_copy", referenced from: cgo_3aa97d579d37_Cfunc_pango_font_description_copy in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_font_description_copy) "_pango_font_description_free", referenced from: cgo_3aa97d579d37_Cfunc_pango_font_description_free in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_font_description_free) "_pango_font_description_get_size", referenced from: cgo_3aa97d579d37_Cfunc_pango_font_description_get_size in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_font_description_get_size) "_pango_font_description_new", referenced from: cgo_3aa97d579d37_Cfunc_pango_font_description_new in _x002.o (maybe you meant: __cgo_3aa97d579d37_Cfunc_pango_font_description_new) "_pango_font_description_set_size", referenced from: cgo_3aa97d579d37_Cfunc_pango_font_description_set_size in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_font_description_set_size) "_pango_layout_new", referenced from: cgo_3aa97d579d37_Cfunc_pango_layout_new in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_layout_new) "_pango_layout_set_font_description", referenced from: cgo_3aa97d579d37_Cfunc_pango_layout_set_font_description in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_layout_set_font_description) "_pango_layout_set_text", referenced from: __cgo_3aa97d579d37_Cfunc_pango_layout_set_text in _x002.o (maybe you meant: cgo_3aa97d579d37_Cfunc_pango_layout_set_text) "_pango_layout_set_width", referenced from: __cgo_3aa97d579d37_Cfunc_pango_layout_set_width in _x002.o (maybe you meant: __cgo_3aa97d579d37_Cfunc_pango_layout_set_width) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

github.com/mattn/go-gtk/glib

ld: warning: ignoring file /opt/homebrew/opt/gettext/lib/libintl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.70.4/lib/libglib-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.70.4/lib/libgobject-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: "_g_filename_from_uri", referenced from: cgo_1efdb3e50950_Cfunc_g_filename_from_uri in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_filename_from_uri) "_g_filename_to_uri", referenced from: cgo_1efdb3e50950_Cfunc_g_filename_to_uri in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_filename_to_uri) "_g_get_application_name", referenced from: cgo_1efdb3e50950_Cfunc_g_get_application_name in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_application_name) "_g_get_current_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_current_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_current_dir) "_g_get_home_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_home_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_home_dir) "_g_get_host_name", referenced from: cgo_1efdb3e50950_Cfunc_g_get_host_name in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_host_name) "_g_get_prgname", referenced from: cgo_1efdb3e50950_Cfunc_g_get_prgname in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_prgname) "_g_get_real_name", referenced from: cgo_1efdb3e50950_Cfunc_g_get_real_name in _x002.o (maybe you meant: __cgo_1efdb3e50950_Cfunc_g_get_real_name) "_g_get_system_config_dirs", referenced from: cgo_1efdb3e50950_Cfunc_g_get_system_config_dirs in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_system_config_dirs) "_g_get_system_data_dirs", referenced from: cgo_1efdb3e50950_Cfunc_g_get_system_data_dirs in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_system_data_dirs) "_g_get_tmp_dir", referenced from: __cgo_1efdb3e50950_Cfunc_g_get_tmp_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_tmp_dir) "_g_get_user_cache_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_user_cache_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_user_cache_dir) "_g_get_user_config_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_user_config_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_user_config_dir) "_g_get_user_data_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_user_data_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_user_data_dir) "_g_get_user_name", referenced from: cgo_1efdb3e50950_Cfunc_g_get_user_name in _x002.o (maybe you meant: __cgo_1efdb3e50950_Cfunc_g_get_user_name) "_g_get_user_runtime_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_user_runtime_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_user_runtime_dir) "_g_get_user_special_dir", referenced from: cgo_1efdb3e50950_Cfunc_g_get_user_special_dir in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_get_user_special_dir) "_g_idle_add_full", referenced from: cgo_1efdb3e50950_Cfuncg_idle_add in _x002.o "_g_list_alloc", referenced from: cgo_1efdb3e50950_Cfunc_g_list_alloc in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_alloc) "_g_list_append", referenced from: cgo_1efdb3e50950_Cfunc_g_list_append in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_append) "_g_list_concat", referenced from: cgo_1efdb3e50950_Cfunc_g_list_concat in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_concat) "_g_list_copy", referenced from: cgo_1efdb3e50950_Cfunc_g_list_copy in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_copy) "_g_list_delete_link", referenced from: cgo_1efdb3e50950_Cfunc_g_list_delete_link in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_delete_link) "_g_list_find", referenced from: cgo_1efdb3e50950_Cfunc_g_list_find in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_find) "_g_list_first", referenced from: cgo_1efdb3e50950_Cfunc_g_list_first in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_first) "_g_list_free", referenced from: cgo_1efdb3e50950_Cfunc_g_list_free in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_free_1, __cgo_1efdb3e50950_Cfunc_g_list_free ) "_g_list_free_1", referenced from: cgo_1efdb3e50950_Cfunc_g_list_free_1 in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_free_1) "_g_list_index", referenced from: cgo_1efdb3e50950_Cfunc_g_list_index in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_index) "_g_list_insert", referenced from: cgo_1efdb3e50950_Cfunc_g_list_insert in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_insert, cgo_1efdb3e50950_Cfunc_g_list_insert_before ) "_g_list_insert_before", referenced from: cgo_1efdb3e50950_Cfunc_g_list_insert_before in _x002.o (maybe you meant: __cgo_1efdb3e50950_Cfunc_g_list_insert_before) "_g_list_last", referenced from: cgo_1efdb3e50950_Cfunc_g_list_last in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_last) "_g_list_length", referenced from: cgo_1efdb3e50950_Cfunc_g_list_length in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_length) "_g_list_nth", referenced from: cgo_1efdb3e50950_Cfunc_g_list_nth in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_nth_prev, cgo_1efdb3e50950_Cfunc_g_list_nth_data , cgo_1efdb3e50950_Cfunc_g_list_nth ) "_g_list_nth_data", referenced from: __cgo_1efdb3e50950_Cfunc_g_list_nth_data in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_nth_data) "_g_list_nth_prev", referenced from: cgo_1efdb3e50950_Cfunc_g_list_nth_prev in _x002.o (maybe you meant: __cgo_1efdb3e50950_Cfunc_g_list_nth_prev) "_g_list_position", referenced from: cgo_1efdb3e50950_Cfunc_g_list_position in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_position) "_g_list_prepend", referenced from: cgo_1efdb3e50950_Cfunc_g_list_prepend in _x002.o (maybe you meant: cgo_1efdb3e50950_Cfunc_g_list_prepend) "_g_list_remove", referenced from: cgo_1efdb3e50950_Cfunc_g_list_remove in