woboq/qmetaobject-rs

Failed to compile qttypes with msvc2019 and Qt 6.3.0-beta2

Closed this issue · 3 comments

Here is the error:

 running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "C:\\Users\\\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\qttypes-0.2.6" "-I" "C:/Qt/6.3.0/msvc2019_64/include" "-W4" "/std:c++17" "/Zc:__cplusplus" "-FoC:\\Users\\\\Desktop\\projects\\cutie\\target\\debug\\build\\qttypes-7f5266fa31b11550\\out\\rust_cpp\\cpp_closures.o" "-c" "C:\\Users\\\\Desktop\\projects\\cutie\\target\\debug\\build\\qttypes-7f5266fa31b11550\\out\\rust_cpp\\cpp_closures.cpp"
  cpp_closures.cpp
  C:\Qt\6.3.0\msvc2019_64\include\QtCore/qglobal.h(105): error C2338: On MSVC you must pass the /permissive- option to the compiler.
  exit code: 2

  --- stderr


  error occurred: ToolExecError: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "C:\\Users\\\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\qttypes-0.2.6" "-I" "C:/Qt/6.3.0/msvc2019_64/include" "-W4" "/std:c++17" "/Zc:__cplusplus" "-FoC:\\Users\\\\Desktop\\projects\\cutie\\target\\debug\\build\\qttypes-7f5266fa31b11550\\out\\rust_cpp\\cpp_closures.o" "-c" "C:\\Users\\\\Desktop\\projects\\cutie\\target\\debug\\build\\qttypes-7f5266fa31b11550\\out\\rust_cpp\\cpp_closures.cpp" with args "cl.exe" did not execute successfully (status code exit code: 2).

Thanks for the bug report.
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=0dc6cc055174a0556f2e41ca269013b3a7056c86
It looks like we need to add /permissive to our compilation flags

Pr #250 only partially fixed it. See #250 (comment)

Thanks once more for the help, now closing the issue.