Mono, which includes a C# compiler, runs on the iPhone.
As to the original question, apparently the iPhone SDK comes with g++,
so you shouldn't have any trouble compiling Tesseract for it--writing
an Objective C frontend to link to it is another matter entirely :)
(But it shouldn't be any more difficult for the iPhone than for a
regular Mac).