OpenCV: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
Problem:
```sh
opencv/modules/python/src2/cv2.cpp:856:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
856 | char* str = PyString_AsString(obj);
In file included from /home/yubao/Software/opencv/modules/python/src2/cv2.cpp:1498:
```
Solution:
Modify: opencv/modules/python/src2/cv2.cpp
From:
```cpp
char* str = PyString_AsString(obj);
```
to:
```cpp
const char* str = PyString_AsString(obj);
```
No comments