Until 3.03 TESSDATA_PREFIX environment variable has the highest priority for setting tessdata path. If it is set then you cannot overrule it with init parameter. You can only change TESSDATA_PREFIX environment variable within your code with putenv(), setenv()[1] or _putenv()[2] (depending on your compiler/platform. [1] http://www.greenend.org.uk/rjk/tech/putenv.html [2] http://msdn.microsoft.com/en-us/library/83zh4e6k.aspx
Zdenko On Tue, Apr 8, 2014 at 12:14 AM, Hsrt <[email protected]> wrote: > Hello, > > I use this code > > > >> if (api->Init("../Tesseract-OCR/", "tur")) { > > errorStr = "Could not initialize tesseract."; > > showError(); > > exit(1); > > } > > > But when I run this code , I get an error > > Error opening data file C:\Program Files > (x86)\Tesseract-OCR\tessdata/tur.traineddata > > Please make sure the TESSDATA_PREFIX environment variable is set to the > parent directory of your "tessdata" directory. > > Failed loading language 'tur' > > Tesseract couldn't load any languages! > > > > I write a path but it don't use it. It use default path "C:\Program Files > (x86)\Tesseract-OCR\tessdata/tur.traineddata" > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- 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 --- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

