rust-qt / ritual

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

Linker error on Windows when doing "cargo build". #73

Closed Frodo45127 closed 6 years ago

Frodo45127 commented 6 years ago

I'm getting the following error when doing a cargo build on Windows:

  = note: ld: cannot find -lQt5Widgets
          ld: cannot find -lQt5Core
          ld: cannot find -lQt5Gui
          ld: cannot find -lQt5Gui
          ld: cannot find -lQt5Core
          ld: cannot find -lQt5Core

error: aborting due to previous error

The thing is, it only happens with the debug builds. cargo build --release builds the executable without problems. Also, the program builds in both modes in Linux without problems. And, ld -l Qt5Core doesn't throw any error (which I guess it means ld can see the lib?). Same with the other two libs.

As extra info, I'm using Qt5 (64bit) installed through MSYS2. This is the repo that throws the error (that's the Qt branch, as I'm porting the program from GTK): https://github.com/Frodo45127/rpfm/tree/feature/rpfm-cute Just ignore the warnings, as the port is far from finished.

Frodo45127 commented 6 years ago

And somehow now works after a cargo clean... Guess it was a problem in my target folder.