https://bugs.kde.org/show_bug.cgi?id=400716

            Bug ID: 400716
           Summary: Build issues on Windows
           Product: rust-qt-binding-generator
           Version: unspecified
          Platform: Other
                OS: other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: demo
          Assignee: j...@vandenoever.info
          Reporter: sto...@gmail.com
  Target Milestone: ---

SUMMARY
The shipped CMakeLists.txt in the example directory has some issues on Windows.
Using Qt 5.11.2 and VS2017

STEPS TO REPRODUCE
1. cmake -G "Visual Studio 15 2017 Win64"
-DCMAKE_PREFIX_PATH=C:\Qt\5.11.2\msvc2017_64\lib\cmake
2. Open "Developer Prompt for VS2017", navigate to the todos example directory
3. msbuild ALL_BUILD.vcxproj

OBSERVED RESULT
LINK : fatal error LNK1104: cannot open file 'rust\target\release\\librust.a'
[C:\src\rustqt3\examples\todos\todos.vcxproj]

EXPECTED RESULT
Build success.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: N/A
KDE Frameworks Version: N/A
Qt Version: 5.11.2

ADDITIONAL INFORMATION

The first error is pretty easy to workaround by modifying the CMakeList.txt to
use "rust.lib" instead of "librust.a". Presumably a Windows convention issue.
Once you do (and rerun cmake) you're met by a wall of linking errors
https://gist.github.com/stofte/15f7cdfe0882b855f5082553ee020076.

I assume rust is linking these symbols somehow? Eitherway, these are found in
WS2_32.LIB and Userenv.lib. Adding these on eg line 64, makes the build
complete successfully on Windows:

list(APPEND Libs Qt5::Core Qt5::Quick Threads::Threads ${CMAKE_DL_LIBS}
WS2_32.LIB Userenv.lib)

Also want to add this is an awesome project, thanks for putting this together!

I did a small writeup for myself here:
https://gist.github.com/stofte/91942f124dfebb875038ad2131fe25e7

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to