Firefly Open Source Community

   Login   |   Register   |
New_Topic
12
New Topic
Print Previous Topic Next Topic

How can I cross-compile C program using toolchain in Android SDK?

47

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
47

How can I cross-compile C program using toolchain in Android SDK?

Posted at 3/8/2017 16:20:13      View:5438 | Replies:11        Print      Only Author   [Copy Link] 1#
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?








Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 3/9/2017 10:37:20        Only Author  2#
you can try NDK
Reply

Use props Report

47

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
47
Posted at 3/13/2017 13:19:06        Only Author  3#

Thank you for your tips.
I'll try NDK
Reply

Use props Report

114

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
114
Posted at 1/9/2026 20:28:01        Only Author  4#
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!
Reply

Use props Report

134

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
134
Posted at 1/10/2026 11:13:38        Only Author  5#
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.
Reply

Use props Report

127

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
127
Posted at 1/11/2026 03:54:05        Only Author  6#
It really broadened my horizons. The IIA-CIA-Part2 vce files questions are free—use them to elevate your career and salary!
Reply

Use props Report

130

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
130
Posted at 1/12/2026 09:46:58        Only Author  7#
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!
Reply

Use props Report

138

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
138
Posted at 1/12/2026 15:17:40        Only Author  8#
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!
Reply

Use props Report

138

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
138
Posted at 1/15/2026 01:11:23        Only Author  9#
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.
Reply

Use props Report

121

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
121
Posted at 1/15/2026 03:55:25        Only Author  10#
This article is truly eye-opening, thank you for sharing. About to face the Latest SAE-C01 version exam – hoping for good results!
Reply

Use props Report

Return to List
12
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list