'OpenCV'에 해당되는 글 4건
opencv2/core/mat.hpp(1965):
warning C4819:
The file contains a character that cannot be represented in the current code page (949).
Save the file in Unicode format to prevent data loss
Solution:
File Save As...
Unicode UTF-8 with signature Codepage 65001
'할거리 > VC' 카테고리의 다른 글
CString to const char* (0) | 2015.08.11 |
---|---|
C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types (0) | 2015.07.20 |
VC : Find Results not displaying Results (0) | 2015.06.24 |
OpenCV 3.0 extra module C2589: '(': token not valid to the right error (0) | 2015.06.10 |
CFileDialog cannot convert const char [22] to LPCTSTR (0) | 2015.05.22 |
http://answers.opencv.org/question/62107/erfiltercpp-nfa-method/
OpenCV v3.0 컴파일 진행중에...
OpenCV\opencv_contrib\modules\text\src\erfilter.cpp 파일에서,
p = std::numeric_limits<double>::min();
C2589: '(': token not valid to the right '::'
이런 에러가 나오고 멈춘다.
http://answers.opencv.org/question/62107/erfiltercpp-nfa-method/
min() 이 부분이
minwindef.h
#define min(a,b) (((a) < (b)) ? (a) : (b))
위와 같이 연결되니까, 당연히 (a,b)가 없다고 에러가 나올수 밖에.
Solution :
(1) OpenCV\opencv_contrib\modules\text\src\precomp.hpp 파일안에,
// added by Michael : 2015-06-10
#if defined WIN32 || defined WINCE
#if !defined _WIN32_WINNT
#ifdef HAVE_MSMF
#define _WIN32_WINNT 0x0600 // Windows Vista
#else
#define _WIN32_WINNT 0x0500 // Windows 2000
#endif
#endif
#include <windows.h>
#undef small
#undef min
#undef max
#undef abs
#endif
windows.h 추가하기 전에 #NOMINMAX 해버리면, min, max 정의하지 않으므로 OK
-끝.
'할거리 > VC' 카테고리의 다른 글
CString to const char* (0) | 2015.08.11 |
---|---|
C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types (0) | 2015.07.20 |
VC : Find Results not displaying Results (0) | 2015.06.24 |
OpenCV warning C4819 current code page (949) (0) | 2015.06.24 |
CFileDialog cannot convert const char [22] to LPCTSTR (0) | 2015.05.22 |
OpenCV GOCR 추가하는 중에,
barcode.c
1229 라인 : char *code=0; int cpos=0;
E2140 Declaration is not allowed here
이런 에러가 발생
원인 : 확장자가 c 이므로 생기는 문제
해결 : Project -> Options -> C++ Compiler 들어가서,
Force C++ compile 를 true로 바꾸어 주어야 한다.