Skip to content

Commit 84d5e5d

Browse files
committed
fix(compat.opencv): link ole32 on Windows (CoCreateGuid in cv::tempfile)
/MT fix cleared the CRT mismatch; the last consumer-link error was a single unresolved external __imp_CoCreateGuid (opencv_core cv::tempfile), a Win32 COM API in ole32.lib. Add -lole32 to the Windows ldflags (clang-cl resolves it off the Windows SDK lib path). Everything else — clang-cl build, install, layout, static libs — already links.
1 parent 9a113bd commit 84d5e5d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkgs/c/compat.opencv.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ package = {
138138
"-Llib", "-Llib/opencv4/3rdparty",
139139
"-lopencv_imgcodecs", "-lopencv_imgproc", "-lopencv_core",
140140
"-llibpng", "-llibjpeg-turbo", "-lzlib",
141+
-- Win32 system import libs OpenCV core pulls (resolved off the Windows
142+
-- SDK lib path clang-cl adds): ole32 for CoCreateGuid (cv::tempfile).
143+
"-lole32",
141144
} },
142145
},
143146
}

0 commit comments

Comments
 (0)