解决linux下汉王OCR库加载失败的问题
This commit is contained in:
parent
1d9ddfd6b0
commit
c8715dea0b
|
@ -6,17 +6,6 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
template<typename dst_type, typename src_type>
|
||||
dst_type union_cast(src_type src)
|
||||
{
|
||||
union {
|
||||
src_type s;
|
||||
dst_type d;
|
||||
}u;
|
||||
u.s = src;
|
||||
return u.d;
|
||||
}
|
||||
|
||||
HGPdfReaderImpl::HGPdfReaderImpl()
|
||||
{
|
||||
m_dll = NULL;
|
||||
|
@ -63,7 +52,7 @@ HGResult HGPdfReaderImpl::Open(const HGChar* fileName)
|
|||
assert(NULL == m_dll);
|
||||
|
||||
HGChar moduleName[256];
|
||||
HGBase_GetModuleName(union_cast<void*>(&HGPdfReaderImpl::Open), moduleName, 256);
|
||||
HGBase_GetModuleName((void *)HGImgFmt_OpenPdfReader, moduleName, 256);
|
||||
HGChar dllPath[256];
|
||||
HGBase_GetFilePath(moduleName, dllPath, 256);
|
||||
|
||||
|
@ -561,7 +550,7 @@ HGResult HGPdfImageWriterImpl::Open(const HGChar* fileName)
|
|||
assert(NULL == m_dll);
|
||||
|
||||
HGChar moduleName[256];
|
||||
HGBase_GetModuleName(union_cast<void*>(&HGPdfImageWriterImpl::Open), moduleName, 256);
|
||||
HGBase_GetModuleName((void*)HGImgFmt_OpenPdfImageWriter, moduleName, 256);
|
||||
HGChar dllPath[256];
|
||||
HGBase_GetFilePath(moduleName, dllPath, 256);
|
||||
|
||||
|
|
|
@ -6,17 +6,6 @@
|
|||
#include "../base/HGInfo.h"
|
||||
#include "../imgfmt/HGBmp.h"
|
||||
|
||||
template<typename dst_type, typename src_type>
|
||||
dst_type union_cast(src_type src)
|
||||
{
|
||||
union {
|
||||
src_type s;
|
||||
dst_type d;
|
||||
}u;
|
||||
u.s = src;
|
||||
return u.d;
|
||||
}
|
||||
|
||||
HGUInt HGOCRHanvon::m_refCount = 0;
|
||||
|
||||
HGOCRHanvon::HGOCRHanvon()
|
||||
|
@ -40,7 +29,7 @@ HGResult HGOCRHanvon::Init()
|
|||
assert(NULL == m_dll);
|
||||
|
||||
HGChar moduleName[256];
|
||||
HGBase_GetModuleName(union_cast<void*>(&HGOCRHanvon::Init), moduleName, 256);
|
||||
HGBase_GetModuleName((void *)HGImgProc_CreateOCRMgr, moduleName, 256);
|
||||
HGChar dllPath[256];
|
||||
HGBase_GetFilePath(moduleName, dllPath, 256);
|
||||
|
||||
|
|
Loading…
Reference in New Issue