-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows compile fail #141
Comments
Can you please post the full build log as returned when you run cargo command with |
rerun-if-env-changed=OPENCV_PACKAGE_NAME Caused by: D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(528): note: see declaration of 'Result<std::vector<size_t,std::allocator<size_t>> *>'D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core_types.hpp(3132): note: A non-const reference may only be bound to an lvalue D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(531): error C2562: 'cv_dnn_BaseConvolutionLayer_getPropAdjust_pads': 'void' function returning a value D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(532): error C2562: 'cv_dnn_BaseConvolutionLayer_getPropAdjust_pads': 'void' function returning a valueD:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): note: see declaration of 'Result<int64_t>' D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(528): note: see declaration of 'cv_dnn_BaseConvolutionLayer_getPropAdjust_pads'D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(533): error C2562: 'cv_getCPUTickCount': 'void' function returning a value D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): note: see declaration of 'cv_getCPUTickCount'D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(907): error C2526: 'cv_dnn_Dict_set_int64_t_const_StringX_const_int64_tR': C linkage function cannot return C++ class 'Result<int64_t>' D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(534): error C2562: 'cv_getCPUTickCount': 'void' function returning a valueD:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(907): note: see declaration of 'Result<int64_t>' D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): note: see declaration of 'cv_getCPUTickCount'D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(910): error C2562: 'cv_dnn_Dict_set_int64_t_const_StringX_const_int64_tR': 'void' function returning a value D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\dnn.cpp(907): note: see declaration of 'cv_dnn_Dict_set_int64_t_const_StringX_const_int64_tR' D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4496): error C2562: 'cv_MatStep_getPropP': 'void' function returning a value --- stderr error occurred: Command "d:\Program Files\c++\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe" "-nologo" "-MT" "-Z7" "-Brepro" "-I" "C:\Users\zhengxingjian\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\opencv-0.41.0\src_cpp" "-I" "C:\Users\zhengxingjian\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\opencv-0.41.0\headers/4" "-I" "D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out" "-I" "." "-W4" "-std:c++latest" "-wd4996" "-wd5054" "-wd4190" "-EHsc" "-bigobj" "-FoD:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.o" "-c" "D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp" with args "cl.exe" did not execute successfully (status code exit code: 2). |
Please build with |
https://github.com/twistedfall/opencv-rust/issues/118,I switched to this plan and succeeded。 |
cl "-nologo" "-MT" "-Z7" "-Brepro" "-I" "C:\Users\zhengxingjian\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\opencv-0.41.0\src_cpp" "-I" "C:\Users\zhengxingjian\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\opencv-0.41.0\headers/4" "-I" "D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out" "-I" "." "-W4" "-std:c++latest" "-wd4996" "-wd5054" "-wd4190" "-EHsc" "-bigobj" "-FoD:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.o" "-c" "D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp" /I "D:\soft\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" /I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt"
err msg:
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core_types.hpp(3132): warning C4239: Non-standard extension used: "Parameter": From "std::_Vb_reference<std: :_Wrap_alloc<std::allocatorstd::_Vbase>>" to "_Ty &"
with
[
_Ty=std::_Vb_reference<std::_Wrap_alloc<std::allocatorstd::_Vbase>>
]
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core_types.hpp(3132): note: Non-constant references can only be bound to lvalues
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): error C2526: "cv_getCPUTickCount": C link function cannot return C++ class "Result<int64_t>"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): note: See the declaration of "Result<int64_t>"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(533): error C2562: "cv_getCPUTickCount": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): note: see the declaration of "cv_getCPUTickCount"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(534): error C2562: "cv_getCPUTickCount": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(530): note: see the declaration of "cv_getCPUTickCount"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4493): error C2526: "cv_MatStep_getPropP": C link function cannot return C++ class "Result<size_t >"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4493): note: See the declaration of "Result<size_t >"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4496): error C2562: "cv_MatStep_getPropP": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4493): note: See the declaration of "cv_MatStep_getPropP"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4497): error C2562: "cv_MatStep_getPropP": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4493): note: See the declaration of "cv_MatStep_getPropP"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4507): error C2526: "cv_MatStep_getPropBuf": C link function cannot return C++ class "Result<size_t ()[2]>"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4507): note: see "Result<size_t ()[2]> "statement of
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4510): error C2562: "cv_MatStep_getPropBuf": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4507): note: See the declaration of "cv_MatStep_getPropBuf"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4511): error C2562: "cv_MatStep_getPropBuf": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(4507): note: See the declaration of "cv_MatStep_getPropBuf"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(5742): error C2526: "cv_SparseMat_Hdr_getPropHashtab": C link function cannot return C++ class "Result<std::vector<size_t,std::allocator<size_t>> *>"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(5742): note: see "Result<std::vector<size_t,std ::allocator<size_t>> *>" declaration
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(5745): error C2562: "cv_SparseMat_Hdr_getPropHashtab": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(5742): note: See the declaration of "cv_SparseMat_Hdr_getPropHashtab"
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(5746): error C2562: "cv_SparseMat_Hdr_getPropHashtab": "void" function return value
D:\rust\opencv4-demo\target\debug\build\opencv-288c62f6b5d51a0c\out\core.cpp(5742): note: See the declaration of "cv_SparseMat_Hdr_getPropHashtab"
/I "D:\soft\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" => To include limits.h
/I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt"=> 为了包含 float.h
The text was updated successfully, but these errors were encountered: