Reputation: 366
I installed Vala via homebrew and compiled a normal hello world app in osx 10.9.3. This is the error-message report:
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libgtk-3.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libgtk-3.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libgio-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libgio-2.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libatk-1.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libatk-1.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libgdk-3.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libgdk-3.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libgdk_pixbuf-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libgdk_pixbuf-2.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libcairo-gobject.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libcairo-gobject.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libpangocairo-1.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libpangocairo-1.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libcairo.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libcairo.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libpangoft2-1.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libpangoft2-1.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libpango-1.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libpango-1.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libgobject-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libgobject-2.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libglib-2.0.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libglib-2.0.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libintl.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libintl.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libfreetype.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libfreetype.dylib
ld: warning: ignoring file /Library/Frameworks/Gtk3.framework/lib/libfontconfig.dylib, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Gtk3.framework/lib/libfontconfig.dylib
Undefined symbols for architecture x86_64: "_g_atomic_int_dec_and_test", referenced from: _block1_data_unref in helloworld-0067aa.o "_g_atomic_int_inc", referenced from: _block1_data_ref in helloworld-0067aa.o "_g_object_ref_sink", referenced from: __vala_main in helloworld-0067aa.o "_g_object_unref", referenced from: __vala_main in helloworld-0067aa.o _block1_data_unref in helloworld-0067aa.o "_g_signal_connect_data", referenced from: __vala_main in helloworld-0067aa.o "_g_slice_alloc0", referenced from: __vala_main in helloworld-0067aa.o "_g_slice_free1", referenced from: _block1_data_unref in helloworld-0067aa.o "_g_type_init", referenced from: _main in helloworld-0067aa.o "_gtk_button_new_with_label", referenced from: __vala_main in helloworld-0067aa.o "_gtk_button_set_label", referenced from: ___lambda3_ in helloworld-0067aa.o "_gtk_container_add", referenced from: __vala_main in helloworld-0067aa.o "_gtk_container_set_border_width", referenced from: __vala_main in helloworld-0067aa.o "_gtk_init", referenced from: __vala_main in helloworld-0067aa.o "_gtk_main", referenced from: __vala_main in helloworld-0067aa.o "_gtk_main_quit", referenced from: __gtk_main_quit_gtk_widget_destroy in helloworld-0067aa.o "_gtk_widget_set_sensitive", referenced from: ___lambda3_ in helloworld-0067aa.o "_gtk_widget_show_all", referenced from: __vala_main in helloworld-0067aa.o "_gtk_window_new", referenced from: __vala_main in helloworld-0067aa.o "_gtk_window_set_default_size", referenced from: __vala_main in helloworld-0067aa.o "_gtk_window_set_position", referenced from: __vala_main in helloworld-0067aa.o "_gtk_window_set_title", referenced from: __vala_main in helloworld-0067aa.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) [Finished in 2.6s with exit code 1] [shell_cmd: valac --pkg gtk+-3.0 /Users/romanfischer/Documents/Vala/gstreamer/src/helloworld.vala -o app.vala && ./app.vala] [dir: /Users/romanfischer/Documents/Vala/gstreamer/src] [path: /bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/Library/Frameworks/Gtk3.framework/bin:/Library/Frameworks/Vala.framework/bin]
How to get Gtk Framework to work? Any help highly appreciated.
Upvotes: 1
Views: 1044
Reputation: 7153
The Gtk+ libaries you have downloaded are compiled for 32-bit processors, but you are attempting to compile for 64-bit. You can:
-X -m32
to build 32-bit binaries.Upvotes: 3