I need to port a fairly large Visual C/C++ Project to Android in my recently started internship.
I asked another question about that topic yesterday, asking for some help finding a concept for the porting.
I got an answer suggesting an automated solution (sth like mono for android), but after a day of research explicit for my concept, i tend to a “manual solution”, which shall mean that i manually remove everythin Windos- and Visual specific by hand and replace it with unter Android available Functions.
Now, the first thing that comes to my mind is to first remove everything Visual specific by using the windows gnu Complier, and after that removing everything Windows sprecific by using the linux gnu Compiler (and than make it runnable on Android using the ndk).
This implicates that i port it from Windows to Linux and than from Linux to Android, assuming that the Linux to Android step is a quite small one since i hope that the Code can remain nearly unmodified from Linux to Android because Android is based on the Linux Kernel.
Now my question is: Is this a good idea, or is porting from Linux to Android also an great effort, so that i would do all work twice, once from Windows to Linux and than another time from Linux to Android?!
Suggestions how to do it better are absolutly welcome!
EDIT: Forget to mention, this will be part of an larger Application and does not contain any GUI Stuff (of cource i know in that cause although the linux to Android Step would be heavy work), just Interfaces to the components lying above and below.
Don’t try to manually remove the “Windows stuff”.
Instead create an “emulation layer” – define all windows functions used by your project in a header and write their bodies.
Thus you’ll keep your project untouched and even take it’s new versions if any.
When porting Windows->Linux you might encounter the following “big” issues:
The biggest trouble in porting Linux->Android should be the UI. If you have no user-interaction involved, I would recommend to port win->lin first.
You could bring and build missing libraries from Linux if needed.
If any user interaction is needed, you might want to write native Android front-end app in Java and interact with your main program by D-Bus.