mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-24 23:33:08 +08:00
@@ -37,10 +37,8 @@ endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
include_directories("${PADDLE_LIB}/paddle/fluid/inference")
|
||||
include_directories("${PADDLE_LIB}/paddle/include")
|
||||
link_directories("${PADDLE_LIB}/paddle/lib")
|
||||
link_directories("${PADDLE_LIB}/paddle/fluid/inference")
|
||||
find_package(OpenCV REQUIRED PATHS ${OPENCV_DIR}/build/ NO_DEFAULT_PATH)
|
||||
|
||||
else ()
|
||||
|
||||
@@ -21,12 +21,18 @@ std::vector<std::string> OCRConfig::split(const std::string &str,
|
||||
std::vector<std::string> res;
|
||||
if ("" == str)
|
||||
return res;
|
||||
char strs[str.length() + 1];
|
||||
|
||||
int strlen = str.length() + 1;
|
||||
chars *strs = new char[strlen];
|
||||
std::strcpy(strs, str.c_str());
|
||||
|
||||
char d[delim.length() + 1];
|
||||
int delimlen = delim.length() + 1;
|
||||
char *d = new char[delimlen];
|
||||
std::strcpy(d, delim.c_str());
|
||||
|
||||
delete[] strs;
|
||||
delete[] d;
|
||||
|
||||
char *p = std::strtok(strs, d);
|
||||
while (p) {
|
||||
std::string s = p;
|
||||
|
||||
Reference in New Issue
Block a user