tag:blogger.com,1999:blog-4059562360294499378.post4956187811685972404..comments2024-02-26T08:56:54.833-08:00Comments on Android Tricks: Hello World C program using Android ToolchainAnonymoushttp://www.blogger.com/profile/02245745164908903746noreply@blogger.comBlogger29125tag:blogger.com,1999:blog-4059562360294499378.post-53108374502803323092013-03-25T08:49:30.998-07:002013-03-25T08:49:30.998-07:00Here is the perfect app for you guys http://akshay...Here is the perfect app for you guys http://akshayeminem.blogspot.in/2013/01/c-and-c-programming-in-android.htmlAkshay Hallurhttps://www.blogger.com/profile/08590988503078944837noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-6632341942705914292012-12-17T18:21:33.854-08:002012-12-17T18:21:33.854-08:00Hello! I simply would really like to present large...Hello! I simply would really like to present large thumbs up for the nice information you’ve got here on this post. i’ll be coming to your journal for a lot of before long <br /><br /><a href="http://www.nflbuying.us" rel="nofollow">cheap jersey</a><br /> <a href="http://www.nflbuying.us" rel="nofollow">cheap nike jerseys</a><br /> <a href="http://www.nflbuying.us" rel="nofollow">cheap jerseys wholesale</a><br /> <a href="http://www.nflbuying.us/mlb-jerseys-c-102.html" rel="nofollow">cheap mlb jerseys</a>Leroy Pfeisterhttps://www.blogger.com/profile/02449016137748028104noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-27652670309794839802012-12-10T00:52:12.931-08:002012-12-10T00:52:12.931-08:00Your photos are lovely. The time you have taken to...Your photos are lovely. The time you have taken to invest in preserving memories is priceless.I hope more. Great job on the site, it looks wonderful. I am going to bookmark it and will make sure to visit often.<br /><br /><a href="http://www.cheapjerseys-football.com" rel="nofollow">jerseys cheap</a>Anonymoushttps://www.blogger.com/profile/17369827601650583639noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-33555897728753205442012-11-28T22:24:57.566-08:002012-11-28T22:24:57.566-08:00This article is old. You now can use the NDK to co...This article is old. You now can use the NDK to compile a native C code file, not only JNI libraries.<br /><a href="http://www.ifnfl.org/" rel="nofollow">cheap jerseys</a><br /><a href="http://www.ifnfl.org/" rel="nofollow">wholesale cheap jerseys</a>Jonah Brightbill NBA BLOGhttps://www.blogger.com/profile/06041359672159137710noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-73280250141741093772012-11-13T23:18:51.833-08:002012-11-13T23:18:51.833-08:00A simple house is a house with few exterior corner...A simple house is a house with few exterior corners. Every house corner beyond a simple box will add roofing complications and increase the cost of building the house. The simplest house is a square or rectangle. Reducing the number of interior walls will also reduce the cost and complexity of a house. Thanks.<br /><a href="http://www.websitedesign24.co.uk/" rel="nofollow">Web design norwich</a><br /><br />santahttps://www.blogger.com/profile/17296903662671972554noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-35153408879316405222012-08-20T09:38:36.847-07:002012-08-20T09:38:36.847-07:00I managed to get a "Hello, World!" appli...I managed to get a "Hello, World!" application running under Android 4.1 with the command line below:<br /><br />arm-eabi-gcc -o hello hello.c -I/home/sandy/android/google_repositories/arm-toolchain/prebuilt/ndk/android-ndk-r7/platforms/android-14/arch-arm/usr/include -Bdynamic -Wl,--gc-section -Wl,-z,nocopyreloc -Wl,--no-undefined -Wl,--dynamic-linker=/system/bin/linker -Wl,-rpath-link=/home/sandy/android/google_repositories/android-4.0.4_r1/prebuilt/ndk/android-ndk-r7/platforms/android-14/arch-arm/usr/lib -L/home/sandy/android/google_repositories/android-4.0.4_r1/prebuilt/ndk/android-ndk-r7/platforms/android-14/arch-arm/usr/lib -nostdlib /home/sandy/android/google_repositories/android-4.0.4_r1/prebuilt/ndk/android-ndk-r7/platforms/android-14/arch-arm/usr/lib/crtend_android.o /home/sandy/android/google_repositories/android-4.0.4_r1/prebuilt/ndk/android-ndk-r7/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o -lc<br /><br />Application Source:<br />#include <br />#include <br /><br />int main( int argc, char **argv )<br />{<br /> printf( "Hello, World!\n" );<br /> return 0;<br />}<br /><br />I only tested this on the AVD emulator so your mileage may vary...<br /><br />awaythrow67https://www.blogger.com/profile/00058155459021405166noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-10323756372085644552012-08-11T04:49:06.938-07:002012-08-11T04:49:06.938-07:00The most pervasive influence on these languages ha...The most pervasive influence on these languages has been syntactical, and they tend to combine the recognizable expression and statement syntax of C with underlying type systems and data models that can be radically different. C++ started as a preprocessor for C and is currently nearly a superset of C. Thanks.<br />Regards,<br /><a rel="nofollow" href="http://www.gulaydin.com/">website design company</a>santahttps://www.blogger.com/profile/17296903662671972554noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-63013106075506753232012-06-01T05:00:34.135-07:002012-06-01T05:00:34.135-07:00Great post, you have pointed out some wonderful de...Great post, you have pointed out some wonderful details, I as well conceive this s a very excellent website. <b><a href="http://www.hongkongcompanyonline.com/" rel="nofollow">Hong Kong Company</a></b>Samhttps://www.blogger.com/profile/05199908681709030650noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-4675084295705313292012-03-28T02:49:25.033-07:002012-03-28T02:49:25.033-07:00@Nirnimesh : This method is better than NDK ??@Nirnimesh : This method is better than NDK ??SegVaulthttps://www.blogger.com/profile/00019524525012863371noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-83405489618092928942011-09-07T13:57:21.732-07:002011-09-07T13:57:21.732-07:00This is awesome post and good imformation
C interv...This is awesome post and good imformation<br /><a href="http://cinterviewquestions.org/" rel="nofollow">C interview questions</a>Anonymoushttps://www.blogger.com/profile/01667354100775626780noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-50102204880969447682011-06-09T23:27:15.671-07:002011-06-09T23:27:15.671-07:00Great article. I like esp. your analysis of leavin...Great article. I like esp. your analysis of leaving out each options and showing the affect.<br /><br />Thanks a lot.Prasad H L Bhathttps://www.blogger.com/profile/06466877628745692737noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-59307565330298166912011-05-31T10:35:05.409-07:002011-05-31T10:35:05.409-07:00I can't stress this enough to my friends and p...I can't stress this enough to my friends and people I talk to about Android apps in general- Most of the best Android apps are the free ones. <br /><br /><a href="http://www.bestappideas.com" title="best android apps" rel="nofollow">best android apps</a> <br /><br /><a href="http://www.bestappideas.com" title="best iphone apps" rel="nofollow">best iphone apps</a>sashahttps://www.blogger.com/profile/01083413237062420158noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-71533428880658705462010-11-18T01:57:46.596-08:002010-11-18T01:57:46.596-08:00This article is old. You now can use the NDK to co...This article is old. You now can use the NDK to compile a native C code file, not only JNI libraries.<br /><br />Here's how to do it:<br />http://www.pocketmagic.net/?p=1462<br /><br />Hope this helps.Radu Motisanhttps://www.blogger.com/profile/14906583449616080099noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-27687251450034267382010-08-18T17:07:42.420-07:002010-08-18T17:07:42.420-07:00Here is another copy of patched up agcc script. h...Here is another copy of patched up agcc script. http://bit.ly/91wnsa <br /><br />@lunkwill You've beaten me by a few days, unfortunately your link is not valid. Could you fix it?vladistanhttps://www.blogger.com/profile/03015131435268562429noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-11352657469668681072010-08-15T17:43:38.812-07:002010-08-15T17:43:38.812-07:00The agcc wrapper doesn't work with android-ndk...The agcc wrapper doesn't work with android-ndk-r4b due to changed paths. I hacked it enough to get a simple printf("Hello, world!") to compile. Modified agcc here:<br /><br />https://docs.google.com/leaf?id=0B8R6VSvTZHZWYWI5OTY3NDgtNmFmMS00OTY2LWI1MmMtYTc0ZmZkZDBmZjk2&hl=enLunkwillhttps://www.blogger.com/profile/08543336341601290962noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-48136935532140385762010-04-29T12:02:06.742-07:002010-04-29T12:02:06.742-07:00I just installed the new NDK (android-ndk-r3)...be...I just installed the new NDK (android-ndk-r3)...before which I was using CodeSourcery's toolchain.<br /><br />When I try to compile from command line, I get the following:<br /><br />main.c:14:24: error: sys/socket.h: No such file or directory<br />main.c: In function 'main':<br />main.c:31: error: 'pthread_t' undeclared (first use in this function)<br />main.c:31: error: (Each undeclared identifier is reported only once<br />main.c:31: error: for each function it appears in.)<br />main.c:31: error: expected ';' before 'listenerThread'<br />main.c:38: error: 'listenerThread' undeclared (first use in this function)<br />main.c: In function 'openSocket':<br />main.c:53: error: 'AF_INET' undeclared (first use in this function)<br />main.c:53: error: 'SOCK_STREAM' undeclared (first use in this function)<br /><br />And so on. The NDK cannot find the #includes.<br /><br />Any way around this? With CodeSourcery I was able to compile from command line very simply:<br /><br />arm-none-linux-eabi-gcc -static -pthread main.c -o main<br /><br />It is not working as I expected. Please advise!<br /><br /><br />Thank you.Vincehttps://www.blogger.com/profile/09548866897514548248noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-18063216026475058522010-04-13T05:47:32.623-07:002010-04-13T05:47:32.623-07:00hi, i am trying to compile Hello.c same as above
...hi, i am trying to compile Hello.c same as above<br /><br />arm-eabi-gcc -o hello hello.c -Wl,-rpath-link=/home/builds/android/out/target/product/generic/obj/lib -L/home/builds/android/out/target/product/generic/obj/lib -nostdlib /home/builds/android/out/target/product/generic/obj/lib/crtbegin_dynamic.o -lc<br /><br />I am getting below error, can any one help me<br /><br />/home/builds/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: cannot find -lc<br />collect2: ld returned 1 exit statusUnknownhttps://www.blogger.com/profile/07959262383114778370noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-86485089070062881232010-04-13T05:44:34.109-07:002010-04-13T05:44:34.109-07:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/07959262383114778370noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-9723999762681066012010-03-22T15:13:31.181-07:002010-03-22T15:13:31.181-07:00Using the NDK r3 in Android 2.1, I was able to com...Using the NDK r3 in Android 2.1, I was able to compile with the following (from the ndk directory):<br /><br />./build/prebuilt/darwin-x86/arm-eabi-4.2.1/bin/arm-eabi-gcc -o hello hello.c -Wl,-rpath-link=./build/platforms/android-5/arch-arm/usr/lib/,-dynamic-linker=/system/bin/linker -L./build/platforms/android-5/arch-arm/usr/lib/ ./build/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o -I./build/platforms/android-5/arch-arm/usr/include -nostdlib -lc<br /><br />Don't know if it works -- I don't have an Android device, just the SDK emulator!Unknownhttps://www.blogger.com/profile/03182798026301613870noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-81508797316250235712009-12-21T14:11:49.584-08:002009-12-21T14:11:49.584-08:00Hi,You helped me so much :)
But I developed an ap...Hi,You helped me so much :)<br /><br />But I developed an application using threads,and made the make file as you stated ,but each time I try to run it on the target ,it arisen a linking error that tells me that it doesn't can to link "libpthread.s0.6",,I know that android uses different libc implementation bionic,,How can I resolve this matter ??<br /><br />Any help will be appreciated :)Unknownhttps://www.blogger.com/profile/13336909961536302020noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-77342145121348641112009-12-05T07:24:39.308-08:002009-12-05T07:24:39.308-08:00For those with the "not found" problem:
...For those with the "not found" problem:<br /><br />That's because you have to specify the path to the Android dynamic linker:<br /><br />arm-eabi-gcc [...] -Wl,-rpath-link=...,-dynamic-linker=/system/bin/linker<br /><br />I've had a hard time with this issue, too.Pedro J. Estébanezhttps://www.blogger.com/profile/05953547057948048367noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-16140670272719664772009-11-27T11:54:54.823-08:002009-11-27T11:54:54.823-08:00just like neiln, I get:
# ./hw
./hw: not found
m...just like neiln, I get:<br /><br /># ./hw<br />./hw: not found<br /><br />my compile options add a couple of -I because the compiler didn't find the headers. also, trying to compile the cupcake from sources (pulled via git) does not compile bionic. do you know anything about that?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-9698365410302269752009-07-23T00:21:17.380-07:002009-07-23T00:21:17.380-07:00I created similar tool named 'droid-wrapper...I created similar tool named 'droid-wrapper'. It can be used for generic software using 'configure' script.<br /><br /> I published it at http://github.com/tmurakam/droid-wrapper/村上 卓弥https://www.blogger.com/profile/18067999236138644834noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-31142892689353986242009-05-15T08:49:00.000-07:002009-05-15T08:49:00.000-07:00Thank you so much. It helped me a lot.Thank you so much. It helped me a lot.Jayden Choehttps://www.blogger.com/profile/06456917517343273853noreply@blogger.comtag:blogger.com,1999:blog-4059562360294499378.post-35632278770227936162009-04-22T19:56:00.000-07:002009-04-22T19:56:00.000-07:00This comment has been removed by the author.Yarxhttps://www.blogger.com/profile/11322584934789150983noreply@blogger.com