Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7598257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:21:47+00:00 2026-05-30T22:21:47+00:00

I want to build a static hello world from C using arm-linux-gnueabi-gcc as opposed

  • 0

I want to build a static hello world from C using arm-linux-gnueabi-gcc as opposed to using the NDK standalone toolchain or Codesourcery for that matter.

In Ubuntu…

I have done the following:

sudo apt-get install gcc-arm-linux-gnueabi

I created a hi.c like this:

#include <stdio.h>

int main(int argc, char** argv) {
   printf("hello world\n");
   return 0;
}

I have compiled it like this:

arm-linux-gnueabi-gcc -static hi.c -o hi 

I ran it on an emulator like this:

adb push hi /data/hi
adb shell /data/hi

But, I get this:

[1]   Illegal instruction     /data/hi

What step have I forgot? Based on past experience this “should” have worked, but I obviously messed this up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:21:48+00:00Added an answer on May 30, 2026 at 10:21 pm

    If I do this on a Debian machine (VM in my case), all seems well. I am not sure what when wrong with doing similar on ubuntu. It could be as Leo suggested, but I cannot confirm. This should work for you though.

    http://www.cnx-software.com/2012/01/16/installing-emdebian-arm-cross-toolchain-in-debian/

    Someone added this link, but it is not using the toolchain I mentioned in the description. Leaving it in case anyone is interested.

    http://tariqzubairy.wordpress.com/2012/03/09/arm-binaries-static-library-for-android/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to build projects from the command line. Is it possible to deploy
I want to build a static library (*.LIB file) GNU libiconv on windows to
I want to build a static library for iphone. I want to give my
I want to build a static library that requires openssl for iPhone. It can't
I want to build both a static and shared version of the same library
I'm just trying to compile the hello world example of boost.python WITHOUT using all
I want to use Facelets to build a static HTML prototype. This prototype will
Hello i build a small app using Android, in this app i built two
I want to compile static library in linux for windows. Following is the procedure
we want to build a site HABJ (*) starting from some HTML 'demo' pages

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.