1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00
Files
Varun Jaiswal 555f0901a3 Merge pull request #29309 from varun-jaiswal17:fix_dll_mismatch
Fix ONNXRuntime dll path mismatch #29309

**1. C2664 build error in `net_impl_backend.cpp`**
`EnableProfiling()` expects `const wchar_t*` on Windows (`ORTCHAR_T`), but was passed `const char*`. 

Fixed by converting to `std::wstring`, as suggested in #29278 

---

**2. Wrong ORT DLL loaded at runtime (`modules/dnn/CMakeLists.txt`)**
With `DOWNLOAD_ONNXRUNTIME=ON`, the DLL glob only searched `bin/` but the downloaded package places DLLs in `lib/`. This left the build tree with no ORT DLL, causing Windows to fall back to the stale `System32\onnxruntime.dll` (1.17.1), crashing against the ORT 1.25.1 API. 

Fixed by adding `lib/` as fallback and staging DLLs into the build bin directory at configure time.

Closes : #29278 

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2026-06-16 18:54:18 +03:00
..
2026-06-09 14:52:54 +02:00
2026-04-29 16:36:02 +03:00
2026-06-01 14:22:51 +03:00
2026-05-20 17:57:51 +03:00
2026-06-05 16:56:55 +03:00
2026-06-05 20:07:44 +05:30
2026-05-20 17:57:51 +03:00