2017-08-07 32 views
-1

我在openCV3.0中使用了tesseract引擎。 当我使用:错误:当我使用tesseract引擎在C++中声明'typedef struct tagBLOB BLOB'时出现冲突

#include <tesseract\baseapi.h> 

它显示:从这个link使用

x86_64-w64-mingw32-g++.exe -Wall -fexceptions -O2 -std=c++11 -DDLIB_PNG_SUPPORT -DLIB_PNG_SUPPORT -IC:\tesseract\tesseract\include -IC:\tesseract\tesseract\include\leptonica -IC:\tesseract\tesseract\include\tesseract -c F:\freelancer\RajivCK\test\ocrtest2\main.cpp -o obj\Release\main.o In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/combaseapi.h:153:0, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/objbase.h:14, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/ole2.h:17, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/wtypes.h:12, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/winscard.h:10, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/windows.h:97, from C:\tesseract\tesseract\include/tesseract\host.h:25, from C:\tesseract\tesseract\include/tesseract\tesscallback.h:22, from C:\tesseract\tesseract\include/tesseract\baseapi.h:31, from F:\freelancer\RajivCK\test\ocrtest2\main.cpp:1: C:/TDM-GCC-64/x86_64-w64-mingw32/include/wtypesbase.h:385:3: error: conflicting declaration 'typedef struct tagBLOB BLOB' } BLOB; ^ In file included from C:\tesseract\tesseract\include/tesseract\baseapi.h:27:0, from F:\freelancer\RajivCK\test\ocrtest2\main.cpp:1: C:\tesseract\tesseract\include/tesseract\platform.h:30:3: note: previous declaration as 'typedef struct _BLOB BLOB' } BLOB, LPBLOB; ^ In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/combaseapi.h:153:0, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/objbase.h:14, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/ole2.h:17, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/wtypes.h:12, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/winscard.h:10, from C:/TDM-GCC-64/x86_64-w64-mingw32/include/windows.h:97, from C:\tesseract\tesseract\include/tesseract\host.h:25, from C:\tesseract\tesseract\include/tesseract\tesscallback.h:22, from C:\tesseract\tesseract\include/tesseract\baseapi.h:31, from F:\freelancer\RajivCK\test\ocrtest2\main.cpp:1: C:/TDM-GCC-64/x86_64-w64-mingw32/include/wtypesbase.h:386:25: error: conflicting declaration 'typedef struct tagBLOB LPBLOB' typedef struct tagBLOB LPBLOB; ^ In file included from C:\tesseract\tesseract\include/tesseract\baseapi.h:27:0, from F:\freelancer\RajivCK\test\ocrtest2\main.cpp:1: C:\tesseract\tesseract\include/tesseract\platform.h:30:10: note: previous declaration as 'typedef struct _BLOB LPBLOB' } BLOB, *LPBLOB; '

为正方体引擎的指南。

+2

能否请您尝试创建一个[最小,完整,可验证的示例](http://stackoverflow.com/help/mcve)的失败的代码,然后编辑您的问题以显示给我们?当你这样做时,请复制粘贴* full *和* complete *错误输出(包括任何可能的信息注释)。 –

+0

这个错误告诉我们你有两个同名的声明。但是,由于缺乏关于问题的信息,我们不能再多说了。您可能会检查您的包含列表,看看它们是否相互冲突... –

+0

我遵循上述链接中的示例。上述问题被编辑为完整的错误。 – abhi

回答

0

我用错了二进制文件,其没有预构建我的OS

相关问题