views:

84

answers:

3

Hi,

I'm working with an OCR project which is developed using Visual C++ on .net framework. But since the .net is platform dependent I want to make this project platform independent and make it supports to multiple operating systems.

So can some one give me a hint to how to do it. Thanks.

+4  A: 

Mono is a cross-platform implementation of .NET that you might consider.

Justin Ethier
Mono isn't even written by Microsoft. Read what Miguel de Icaza, creator of Mono, said a few weeks ago:http://www.itwire.com/opinion-and-analysis/open-sauce/37880-microsoft-has-shot-net-ecosystem-in-foot-de-icaza
mindas
@mindas, you do realise that Mono was developed by Miguel and his team; That is has support from MS and is a really good implementation of the .Net framework for other platforms? I think Miguel's comments may have been taken out of context, i.e. why the article was pulled from the source site. Yes, MS missed out on an opportunity but that doesn't make it a bad or incorrect platform. Miguel went on from Mono to create MonoTouch to enable .Net development on the iPhone, that doesn't indicate a belief that .Net is somehow fatally flawed.
Lazarus
In fact, SO even serves up adds for MonoTouch :)
Justin Ethier
I haven't said .net/Mono is flawed. I even think .net outshines Java in various aspects (take generics for example). But what I'm saying is that I will only start to believe that .net is cross-platform when MS will write at least one non-Windows implementation of it. If you don't agree to me, then please tell me about Mono usage in enterprise world, how does it compare with MS .net implementation? Their FAQ page says "The Mono API today is somewhere in between .NET 2.0 and .NET 3.5" while V4 was announced by MS on 29 Sep 2008. Do I need to add more?
mindas
A: 

You also can try Qt. You can use Visual C++ for Windows platform, and g++ with other platforms (Mac/Linux). It gives you much better GUI than Mono can give.

prosseek
thanks for the answer.
Thilanka
A: 

Why are you using Visual C++ running on .Net? I would recommend you either switch to Native C++, or use a better .NET language like C#. To be honest I'm not sure that Mono can handle the managed C++ thing.

If switching to native C++, then be sure to abstract away any platform specific bits. Also, be sure that your application will run on both 32 and 64 bit. Use platform-independent APIs such as GTK or WxWidgets.

If you switch to C#, then read up on what some of the APIs are that Mono does not(and never will) support. Do not do any unsafe code or P/Invokes.

And no matter which way you choose, Always regularly test your program on Windows and Linux. If it works on Linux it usually works on Mac too, but I'd test on all three at least once a day

Earlz
The original code was written by some one else on .net framework using V C++. It is the Sahana OCR project. Now I'm going to propose a project on Gsoc to make it platform independent. IS there is any other way to running it unless use the Visual C++ to running it.
Thilanka