Build libev on android ndk - android-ndk

I'm coding a program that really need libev (not libevent) on Android. I google many time to find how to build libev but unsuccess.
Could any one tell me, how to build libev on android. Thank so much.

Did you have any success? I'm stuck with the same problem, trying to use it on a native app for Android (working on Ubuntu). This article gave me some light:
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#EMBEDDING
It might be useful for you. I tried the standalone case. In any case, I can't still make it work

Related

Can I debug a program with LLDB-MI via Eclipse?

It seems that LLDB plugin for Eclipse is still not developed yet, but this article claims that one can debug a program with LLDB-MI driver in Linux. However described way of integrating Eclipse and LLDB doesn't work for me (I always get "command --exec-continue not recognized" error message) and it looks suspicious that embedding LLDB-MI to Eclipse may be so easy.
Could anyone point me to curren materials on this topic? Google shows me only old Eclipse-bug-tracking threads.
There is a project called lldbmi2 that provides most of the functionality one would need. I know it's been developed primarily for the Mac and I don't know if it's been tested on Linux. It's not perfect, but I've been using it on the Mac for months and I'm pleased with its functionality.
See https://github.com/freedib/lldbmi2

Make a game with Cocos2dx on Linux

I'm some familiar with Cocos2d and Cocos2dx.
But only I worked in Mac, I know which is possible work with this engine (Cocos2dx) in Windows, but I don't know if is possible develop a game on Linux.
By the way:
I'm not talking about a port, I want develop a Videogame multiplataform on Linux.
Would be great know the way of how start my game on Linux.
Thanks!
While I haven't tried it, cocos-2dx is, according to their documentation, is usable on Linux although my understanding is that this means one can build android projects using cocos2d on Linux.
In terms of where to start, I've used both SFML and SDL as both are well supported on Linux. Both are cross platform although SDL supports a wider range of platforms - I have an SDL2 game in progress that runs on Linux and android for instance whereas SFML does not yet have android or iOS support. Coming from cocos2d though I think you'll find the SFML API easiest to pick up.
As a fair warning, the landscape is a bit confusing at present because both SFML and SDL have a popular stable release (1.6 for SFML and 1.2 for SDL) with one API along side a popular development release (2.0 for SFML and 1.3/2.0 for SDL) that has a similar but not identical API. This is particularly noticeable with SDL where the documentation for 1.2 is much better than the documentation for the development API. In terms of choosing one over the other, the stable releases are precisely that - stable. In both cases the development releases have been under way for some time so if you are willing to dig for documentation a bit and ask questions it's worth getting the new features.
There is book that provides a nice introduction to Linux game development that, while dated, might be a good first step if this is your first outing with games on Linux, especially if you decide to use SDL Programming Linux Games.
Update:
I saw the directions here and after (roughly) following them cocos2dx does build on my Ubuntu 12.04 x64 machine. The "Set up Environment" directions seem sound but the makefile information appears to be out of date as there is no build_linux.sh instead there is a make-all-linux-project.sh. After this finished pulling in missing deps and building I changed into the samples/HelloCpp/proj.linux directory and ran make. This created a HelloCpp binary in samples/HelloCpp/proj.linux/bin/debug. Running that popped a HelloWorld cocos2d screen. According to the output the verison is:
cocos2d-x debug info [cocos2d: cocos2d-2.1beta3-x-2.1.0]
That said, I don't see a lot of documentation for the linux port and most of the related community entries seem to be out of date so you may find more support from using one of the libraries I already mentioned.
Download cocos2d-x project there is a test sample games which compiles on all platform android, windows, iOS , Windows Phone ...See you are going to code in c++ that's it then whether you build it in linux or any other platform doesnt matter for cocos2d-x kind of engine
so i suggest start with the sample projects of cocos2d-x .... and as you want to do it in linux ...make something then compile it in linux like I do ...

how good is monotouch and mono for android comparing with native code?

I make small investigation how good is monotouch and mono for android comparing with native code? What I need is numbers and maybe some other info about advantages and disadvantages of monotouch and mono for android...
Thank you!
I don't have comparison figures but I have used both MonoTouch and MonoDroid for an OpenGL application.
The type of application your making may make the difference to you.
If you want to create a cross platform application I personally would go with Mono as its probably going to be more productive in the end.
I have must say MonoTouch outperforms MonoDroid, probably because of the .NET to java interop that must take place on Android (and the Java on Android seams to be slow)[At least android 2.2+ devices].
There is also Mono.Simd if you need speed optimizations.
UPDATE: "Mono.Simd" is not available on MonoTouch or MonoDroid.
I know this is not a real answer, but in my opinion, it is the best. You can get both a native app as well as lots of code re-use. There are lots of things out there that could help you make a decision, but also look at the Xamarin blog.
here a link that may help you :
http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html
based on that mono is way faster than java dalvik!

Android: is there any tool for profiling native code?

I have only found one profiling tool - http://code.google.com/p/android-ndk-profiler/. Wasn't able to get it working so far, so I wonder if there are other tools available.
I need to profile on a physical device, as my application doesn't even work on emulator.
It is not easy to make the Android-NDK profiler work. You need to follow the steps here thoroughly.
Here are some tips that led me to success:
Make sure your android.mk is correct and that you export the NDK_MODULE_PATH.
Use correctly the following functions
monstartup("your_lib.so");
moncleanup();
If the gmon.out is generated now you need to pull it from the device, but not to anywhere in your PC. For me it only works if I go to the application's folder (where jni, obj, res and other folders are) and I do:
console$ adb pull sdcard/gmon.out
Then run gprof. Try will all the versions in your NDK toolchains. For me only one worked, this one:
console$ ~/Libraries/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gprof obj/local/armeabi-v7a/libxxxx.so > profile.txt
The Shiny profiler is platform independent, it runs anywhere and it does not have any dependencies besides a standard C++ compiler. In its more simple usage, all you need to do is add a macro at the beginning of all functions and methods (or at least those that you want to profile).
Intel VTune Amplifier. This profiler allows you to collect hotspots with stacks on Android devices without root or any OS modification.
Here is simple guide:
http://software.intel.com/en-us/articles/using-intel-vtune-amplifier-on-non-rooted-android-devices
In the NDK r13b there is a new tool called simpleperf

C/C++ iOS to Android

I have a game written in C/C++ for iOS (using only obj-c for the GLES initialization) and I would like to port it to Android, I saw that it was possible using the NDK by creating a dynamic library (.so).
I install the Android SDK and NDK compile a simple library load it run, no problem, but I simply can't debug it... I can only debug the Java part (where my GLES context is created etc...) Am I missing something or? how can I debug my dynamic library?
It doesn't seems to have no support for debugging anything created with the NDK for Eclipse... so how am I suppose to debug my C/C++ then?
Anybody have experience with this? Any help would be greatly appreciated!
You have to use ndk-gdb. Take a look at this articles:
http://groups.google.com/group/android-ndk/web/debugging-through-the-jni-with-android-2-2
http://www.eclipse.org/sequoyah/documentation/native_debug.php

Resources