We have existing Unix .C code that is pretty process intensive. The project builds into a .so that is used by other products. The idea was to build the .so and then write a graphical interface for Droid to drive it. We were hoping that this would be pretty straight forward, but it's looking like its not going to be as easy as we thought.
-Mark On Dec 7, 7:37 pm, Kristopher Micinski <[email protected]> wrote: > On Wed, Dec 7, 2011 at 3:00 PM, Mark Winchester <[email protected]> wrote: > > I've got an exising project, piles of .c, .h, .cpp, and makefiles that > > currently works in a Unix environment. I'm trying to build it to work > > under Android. I started converting the existing makefiles into > > Android.mk files to build it using the Android NDK. I've run into > > lots of problems. Is it possible to build the static and shared > > libraries using the existing makefiles? Is it necessary to use ndk- > > build to create the shared libraries? > > > I'm neither an Android or Unix guy, so please go easy on me. I'm much > > more comfortable with Visual Studio. > > I've seen a few people ask questions like these, the general answer > given reduces down to this: > If it's a unix app (which are usually text / batch based, let's say, > just to be old world about it), why are you trying to run it on > Android? > > This has a number of different answers: > -- I shouldn't actually be running it on Android, this doesn't make any > sense > -- I am underestimating the UI difference between Android and the app I have > -- My app has lots of processing functionality that makes sense for > an Android app, but not an Android UI > > If your app is just plain useless in a mobile environment (and if its > written in C, it very well may be) then answer 1 may apply... However, > there might be the possibility that the thing you're writing is UI > based, but isn't written for Android. Android introduces a new > interaction style, and it is seriously worth considering investing > some hard time into thinking about changing your app to support the > new android style (this boils down to, at least rewriting a major part > of your application, assuming you call the UI a major part.) The > third point is probably most valid, that the code you have does > something useful, but doesn't have an Android styled UI (for example, > media processing apps, etc...). In this case you should try to > structure your code as a library which is fairly system independent, > and then write a UI around that with your code wrapped in the NDK. > > However, the fact that your code won't build in Android probably > implies that, indeed, something is seriously underplanned in this > department (as you're probably getting build failures because you're > trying to link against some system library not included in the NDK). > In general, trying to slam all of your C/C++ code into the NDK and > write a few hundred lines of UI around your NDK code is a *bad* > idea... > > kris -- You received this message because you are subscribed to the Google Groups "Android Developers" 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/android-developers?hl=en

