On 11/19/2010 12:19 AM, Piyush Khanna wrote:
> I understand that I should ideally be using NDK. However, as I said,
> the setup is from pre-NDK times, and I'd have to restructure the code
> completely for NDK. Also, I'm not sure NDK provides all shared
> libraries which I need.
>
> Having said that, I compiled my native binary using the Android 2.2.1
> source-code, and got no compilation/linking errors. I was also able to
> load my native library without any issues on the Android 2.2.1
> emulator - how so?
If you're linking against Android shared libraries, then that's likely
your problem: There's no guarantee that a shared library will be the
same as the stock 2.2.1 library on any particular phone, or even that it
will have the same name on the phone. Or maybe there are new security
restrictions that restrict what code can be executed in 2.2.1 that are
disabled in the "rooted" emulator?
In any event, this is the NDK list, for discussing the writing of
applications for the NDK; I'm sure people on this list will be glad to
help you convert your pre-NDK project to work on the NDK, but until you
do, your question isn't an NDK question. And it seems like a good time
to restructure your code to use the NDK, so welcome to the list. ;)
If you want an answer as to how to do things without the NDK, then you
might try one of the other lists (android-porting? not sure) or Stack
Overflow.
Tim