From c171898a623e45e1ef8cb8cab1fe3d0baf0ebf6b Mon Sep 17 00:00:00 2001 From: benjaminwan Date: Sat, 18 Jun 2022 11:13:08 +0800 Subject: [PATCH] fix: windows build error --- include/OcrLiteCApi.h | 6 +++--- src/OcrLiteCApi.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/OcrLiteCApi.h b/include/OcrLiteCApi.h index ab98560..3ef9f20 100644 --- a/include/OcrLiteCApi.h +++ b/include/OcrLiteCApi.h @@ -15,7 +15,7 @@ extern "C" #endif typedef void *OCR_HANDLE; -typedef char BOOL; +typedef char OCR_BOOL; #ifndef NULL #define NULL 0 @@ -41,12 +41,12 @@ _QM_OCR_API OCR_HANDLE OcrInit(const char *szDetModel, const char *szClsModel, const char *szRecModel, const char *szKeyPath, int nThreads, int gpuIndex); -_QM_OCR_API BOOL +_QM_OCR_API OCR_BOOL OcrDetect(OCR_HANDLE handle, const char *imgPath, const char *imgName, OCR_PARAM *pParam); _QM_OCR_API int OcrGetLen(OCR_HANDLE handle); -_QM_OCR_API BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen); +_QM_OCR_API OCR_BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen); _QM_OCR_API void OcrDestroy(OCR_HANDLE handle); diff --git a/src/OcrLiteCApi.cpp b/src/OcrLiteCApi.cpp index 68a5091..cbc220a 100644 --- a/src/OcrLiteCApi.cpp +++ b/src/OcrLiteCApi.cpp @@ -27,7 +27,7 @@ OcrInit(const char *szDetModel, const char *szClsModel, const char *szRecModel, } -_QM_OCR_API BOOL +_QM_OCR_API OCR_BOOL OcrDetect(OCR_HANDLE handle, const char *imgPath, const char *imgName, OCR_PARAM *pParam) { OCR_OBJ *pOcrObj = (OCR_OBJ *) handle; @@ -74,7 +74,7 @@ _QM_OCR_API int OcrGetLen(OCR_HANDLE handle) { return pOcrObj->strRes.size() + 1; } -_QM_OCR_API BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen) { +_QM_OCR_API OCR_BOOL OcrGetResult(OCR_HANDLE handle, char *szBuf, int nLen) { OCR_OBJ *pOcrObj = (OCR_OBJ *) handle; if (!pOcrObj) return FALSE;