Firefly Open Source Community

Title: How can I cross-compile C program using toolchain in Android SDK? [Print This Page]

Author: fireworks    Time: 3/8/2017 16:20
Title: How can I cross-compile C program using toolchain in Android SDK?
Last edited by fireworks In 3/8/2017 16:33 Editor

I'd like to compile C program with arm-linux-androideabi-gcc in Android 5.1 SDK, but I couldn't because of following error.¡ý
         

So I tried several ways and now I'm using like this.

[Linux]
    1.  Created ¡®test¡¯ folder in ~/firefly-rk3288/build/external.
    2.  Wrote hello.c file in ~/firefly-rk3288/external/test.

         < Hello.c >
         
    3.  And wrote Android.mk like below.
         < Android.mk>
           
    4.  Ran 'make hello' and got hello executable file at build top directory.


[rk3288 target board]
         

There's no error with this method, but the biggest problem is that it takes too much time to compile.
So, I want to know how to use the compiler (arm-linux-androideabi-gcc) directly. eg. do I need environment variable setting?









Author: isle    Time: 3/9/2017 10:37
you can try NDK
Author: fireworks    Time: 3/13/2017 13:19
isle Posted at 3/9/2017 10:37
you can try NDK

Thank you for your tips.
I'll try NDK
Author: jaycook507    Time: 1/9/2026 20:28
I really appreciate your article, it left a strong impression. Thanks to the SC-401 valid practice questions sheet exam, I reached a new level in my career. Now I¡¯m sharing it for free with all of you!
Author: halbell156    Time: 1/10/2026 11:13
I¡¯m really inspired by this article, thank you for sharing it! Free access to B2B-Solution-Architect valid learning materials¡¯s rich content is available, hoping it benefits you in your studies.
Author: stanpar318    Time: 1/11/2026 03:54
It really broadened my horizons. The IIA-CIA-Part2 vce files questions are free¡ªuse them to elevate your career and salary!
Author: hughkel311    Time: 1/12/2026 09:46
I¡¯m so appreciative of your article, it¡¯s left a big impression. With the help of this Exam Consumer-Goods-Cloud-Accredited-Professional preparation, I earned a promotion and a pay raise. Now I¡¯m offering it for free to everyone. Wishing you all success in your careers!
Author: henryjo644    Time: 1/12/2026 15:17
By reading this article, I¡¯ve developed a new understanding of both my work and life. Examcollection C-S4TM-2023 dumps was the catalyst for my career and salary increase¡ªnow I¡¯m giving it to you for free!
Author: seanbro626    Time: 1/15/2026 01:11
Viele Kandidaten wissen einfach nicht, wie sie sich auf die Pr¨¹fung vorbereiten können und hilflos sind. Aber mit den Schulungsunterlagen zur PECB NIS-2-Directive-Lead-Implementer Zertifizierungspr¨¹fung von Zertpruefung ist alles ganz anders geworden. Mit ihr können Sie sich ganz selbstsicher auf Ihre Pr¨¹fung vorbereiten. Sie haben kein Risiko, in der Pr¨¹fung durchzufallen, mehr zu tragen. Das ist nicht nur seelische Hilfe. Am wichitgsten ist es, dass Sie die Pr¨¹fung bestehen und eine glänzende Zukunft haben können.
Author: sarahmo325    Time: 1/15/2026 03:55
This article is truly eye-opening, thank you for sharing. About to face the Latest SAE-C01 version exam ¨C hoping for good results!
Author: kenhill168    Time: 1/19/2026 14:11
Through this article, I gained a lot of useful information. The New COBIT-Design-and-Implementation exam questions materials are free¡ªyour key to climbing the career ladder and earning more!
Author: benbell755    Time: 6 day before
The content is incredible, I don¡¯t even have to think before liking it. Best of luck! Here¡¯s the free MD-102 exam sample questions material shared with you.




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1