rust-qt / ritual

Use C++ libraries from Rust
Apache License 2.0
1.22k stars 49 forks source link

OSX library not found for -lQt5Gui #67

Closed vlovich closed 6 years ago

vlovich commented 6 years ago

trying to build a very simple app on OSX. Qt5 installed via homebrew. Looks to be some kind of confusion as cpp_to_rust should probably be passing the -framework flag on OSX instead of trying to link explicitly to individual Qt libraries?

  = note: "cc" "-m64" "-L" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride0.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride1.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride10.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride11.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride12.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride2.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride3.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride4.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride5.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride6.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride7.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride8.rust-cgu.o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.ride9.rust-cgu.o" "-o" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43" "src/ride/ride/target/debug/deps/ride-6203a9cc1ea02c43.crate.allocator.rust-cgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "src/ride/ride/target/debug/deps" "-L" "src/ride/ride/target/debug/build/fontsan-e421d55911bffb66/out/lib" "-L" "src/ride/ride/target/debug/build/miniz-sys-b8bddff7cf4c1223/out" "-L" "/opt/homebrew/Cellar/qt/5.10.0/lib" "-L" "/opt/homebrew/Cellar/qt/5.10.0/lib" "-L" "src/ride/ride/target/debug/build/qt_gui-44210001ee586765/out/c_lib_install/lib" "-L" "/opt/homebrew/Cellar/qt/5.10.0/lib" "-L" "src/ride/ride/target/debug/build/qt_core-bdc98b4a9bc5fbeb/out/c_lib_install/lib" "-L" "/opt/homebrew/Cellar/qt/5.10.0/lib" "-L" "/opt/homebrew/Cellar/qt/5.10.0/lib" "-L" "/opt/homebrew/Cellar/qt/5.10.0/lib" "-L" "src/ride/ride/target/debug/build/qt_widgets-a60d7919ed1ae7c5/out/c_lib_install/lib" "-L" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib" "src/ride/ride/target/debug/deps/libqt_gui-4e9e544b23b5ab2c.rlib" "src/ride/ride/target/debug/deps/libqt_core-f84aad4d021306b1.rlib" "src/ride/ride/target/debug/deps/liblibc-fa97112e9ce8b6b2.rlib" "src/ride/ride/target/debug/deps/libcpp_utils-aa984d6d79c0ad7d.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/libstd-a5573c28baa2d270.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-0e1dd264eb0295ca.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-40e38640b113cbe4.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/libunwind-4d7cc397a07cb119.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-3555cc0ff631180a.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/liblibc-d3676d01f6a9d053.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/liballoc-0285aed88b3edf43.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-8a7521ee3925d10e.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/librand-7270a913c138d53b.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/libcore-24fa1060c4e0b7b1.rlib" "/opt/homebrew/Cellar/rust/1.22.1/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-eeb63a38b1651c16.rlib" "-l" "Qt5Gui" "-l" "Qt5Core" "-l" "stdc++" "-l" "Qt5Core" "-l" "stdc++" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
  = note: ld: library not found for -lQt5Gui
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
vlovich commented 6 years ago

Also there's no Qt5Gui library. There's the QtGui framework which has he QtGui library...