Update on this, it seems like I wasn't including enough libs for static linking. But even when I run the APIExample under LIB DEBUG with all the libs in the depencies, I get the following errors:
Error 1 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) C:\Tesseract-OCR\APIExample\baseapitester\libtesseract302-static-debug.lib(neuron.obj) baseapitester Error 2 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) C:\Tesseract-OCR\APIExample\baseapitester\libtesseract302-static-debug.lib(input_file_buffer.obj) baseapitester Error 3 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) C:\Tesseract-OCR\APIExample\baseapitester\libtesseract302-static-debug.lib(word_altlist.obj) baseapitester there are 243 errors similar to this in different objs, all starting with __declspec(dllimport). Any help? On Saturday, November 24, 2012 7:30:25 PM UTC-6, Minjie Zheng wrote: > > Okay, I have spent literally two days trying to get tesseract to work in > VS2012. No matter what I do, my programs would not execute. It compiles > without error. It always say "The application was unable to start correctly > (0xc0150002)." Using dependency walker, I found that both libtesseract and > liblepton are looking for MSVCR90D.dll, which I obviously don't have since > I don't have VS2008. > > So I tried to recompile both libtesseract and liblepton with > VS2012. libtesseract302 compiled fine under VS2012 and it now works with > MSVCR110D.dll. However, I can't get liblepton to compile. I have zlib, > lpng, jpeg-8c all compiled with VS2012. But when I try to compile > tiff-3.9.4 following instruction here > http://www.leptonica.org/vs2008doc/building-image-libraries.html. cl.exe > just returns an error 0xc0150002, which was the same error with my new > program. > > Unable to compile liblepton with MSVCR110D, I thought maybe I'll just > statically link my project to the libraries. Under my project > properties->linker->Input->Additional Dependencies, I > put libtesseract302-static-debug.lib liblept168-static-mtdll-debug.lib. > However, now my project won't even compile. It throws over 100 errors in > both libs. Am I not linking the static library correctly? I'm completely > out of ideas as to how to proceed. Any help would be appreciated. > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en

