I am having several problems with tessdll in Visual Studio 2008. FYI, I created this app as an MFC application, I did this just to take advantage of the simple GUI I needed. It is just straight C++ and win32 from there on out.
This builds fine as a debug release for some reason (as I have included the header files and lib files that I need, and dll resides in every directory I could put it......).
So, there is a linking problem during building a release version:
Linking...
MTGOBot.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: __thiscall TessDllAPI::TessDllAPI(char const
*)" (__imp_??0TessDllAPI@@QAE@PBD@Z)
MTGOBot.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: __thiscall TessDllAPI::~TessDllAPI(void)" (__imp_??
1TessDllAPI@@QAE@XZ)
MTGOBot.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: int __thiscall TessDllAPI::BeginPage(unsigned
int,unsigned int,unsigned char *,unsigned char)" (__imp_?
BeginPage@TessDllAPI@@QAEHIIPAEE@Z)
MTGOBot.obj : error LNK2001: unresolved external symbol "__declspec
(dllimport) public: struct ETEXT_STRUCT * __thiscall
TessDllAPI::Recognize_all_Words(void)" (__imp_?
Recognize_all_Words@TessDllAPI@@QAEPAUETEXT_STRUCT@@XZ)
C:CPP ProjectsVisual Studio 2008ProjectsMTGO SO BotMTGO SO Bot
ReleaseMTGO SO Bot.exe : fatal error LNK1120: 4 unresolved externals
Also, for reference, the source to tessdll.h can be found here:
http://code.google.com/p/tesseract-ocr/source/browse/trunk/tessdll.h?r=165
A few more details:
- I debug by from the toolbar and use
the integrated debugger.
- I use Batch
Build to create the release version.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…