Thank you, it works.
but I still can not run the resulted executable on emulator.
I used "adb push" to move the executable to the sdcard and I tried to
run it but I got a "permission denied" message. The file doesn't have
an executable permission. chmod didn't help!
Is this because sdcard is formatted as FAT32? so, what a directory I
can move the file to to try?
thanks again.