On Sun, May 26, 2013 at 8:16 AM, <vaden...@gmail.com> wrote:

> Hi. i'v get a problem - my app don't works in release version, debug
> version works good.
> what can it be?
> in release version it crashes at point
>
>  char *abc = api.GetUTF8Text();
>
> with message "System.AccessViolationException"
>
> it will work well if i will comment the block:
>
> String^ currentDir = Environment::CurrentDirectory;
> String^ name = "TESSDATA_PREFIX="+currentDir;
> char* variabl = (char*)Marshal::StringToHGlobalAnsi(name).ToPointer();
> _putenv(variabl);
>
> block used to link  TESSDATA_PREFIX with .trainedata in environment
> variables.
>
> in DEBUG it works correct as predicted... how to solve this problem?
>

Looks like you're using C++/CLI and therefore trying to use tesseract from
a .NET language. So that might complicate things.

But often when a program fails when calling a Runtime library function, it
is using mismatched runtime DLLs. Make sure in your Release Configuration
that you are building with the non-Debug version of the C Runtime Library
(specify /MD *not* /MDd) --- and that everything else you are linking with
was also built with /MD.

Use Dependency Walker [1] to investigate and maybe Process Explorer [2].

[1] http://dependencywalker.com/

[2] http://technet.microsoft.com/en-us/sysinternals/bb896653

-- 
-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to tesseract-ocr@googlegroups.com
To unsubscribe from this group, send email to
tesseract-ocr+unsubscr...@googlegroups.com
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 tesseract-ocr+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to