Skip to content
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

bug when build opencv: QT 6.7, UNICODE, __itt_domain_create #25543

Open
3 of 4 tasks
sunqian119 opened this issue May 5, 2024 · 3 comments
Open
3 of 4 tasks

bug when build opencv: QT 6.7, UNICODE, __itt_domain_create #25543

sunqian119 opened this issue May 5, 2024 · 3 comments

Comments

@sunqian119
Copy link

System Information

OpenCV: 4.9.0
Operating System / Platform: WIN 11 Home
Compiler & compiler version: MSVC 1939
CMake version: 3.29.2

Detailed description

I choose "WITH_QT" (version 6.7.0) and "build_opencv_world" in cmake-gui, part of error logs are as follows:

D:\OPENCV\opencv-4.9.0\modules\core\src\trace.cpp(211,46): error C2664: “__itt_domain *(const wchar_t *)”: 无法将参数 1 从“const char [12]”转换为“const wchar_t *”
D:\OPENCV\opencv-4.9.0\modules\core\src\trace.cpp(211,46):
指向的类型不相关; 转换需要 reinterpret_cast、C 样式强制转换或带圆括号的函数样式强制转换
D:\OPENCV\opencv-4.9.0\modules\core\src\trace.cpp(241,61): error C2664: “__itt_string_handle *(const wchar_t *)”: 无法将参数 1 从“const char *const ”转换为“const wchar_t *”
D:\OPENCV\opencv-4.9.0\modules\core\src\trace.cpp(241,61):
指向的类型不相关; 转换需要 reinterpret_cast、C 样式强制转换或带圆括号的函数样式强制转换

1
2
3

However, everything is fine when I only choose "build_opencv_world" or "WITH_QT".
And in QT assistant, I find that "In Qt 6, the UNICODE and _UNICODE compiler definitions are set by default for targets that link against Qt modules".

Steps to reproduce

choose "WITH_QT" (version 6.7.0) and "build_opencv_world" in cmake-gui

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)
@sunqian119 sunqian119 added the bug label May 5, 2024
@opencv-alalek
Copy link
Contributor

There are several options:

@sunqian119
Copy link
Author

There are several options:

Thanks anyway. I have added the command at this place and it worked.
1
Maybe the only one solution is to disable the UNICODE. 😅

@opencv-alalek
Copy link
Contributor

There is still a problem in source code, so lets keep this issue open.

@opencv-alalek opencv-alalek reopened this May 8, 2024
@asmorkalov asmorkalov modified the milestones: 4.10.0, 4.11.0 May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants