Thread
:
On-device development in C/C++?
View Single Post
virusforu
2011-07-08 , 16:22
Posts: 7 | Thanked: 2 times | Joined on Apr 2010 @ Delhi
#
78
C Programming on Maemo Device (N 900): Mobile C programming lab
Download the following files to work with gcc
binutils_2.18.50.20070820-4+0m5_armel.deb
libgcc1_4.2.1-4maemo9+0m5_armel.deb
libgomp1_4.2.1-4maemo9+0m5_armel.deb
cpp-4.2_4.2.1-4maemo9+0m5_armel.deb
gcc-4.2-base_4.2.1-4maemo9+0m5_armel.deb
gcc-4.2_4.2.1-4maemo9+0m5_armel.deb
1. connect your N900 to PC and copy above files into one folder
~ $
cd ~/MyDocs //change to this folder in N900 in xterm
~/MyDocs $
cd files //here your above files are copied
~/MyDocs/files $
dpkg i * // to run all the files in files folder
~/MyDocs/files $
vi hellowrold.c //create a c program by using vi editor
Note : for entering any letter you should press I to enter in to insert mode
#inlcude <stdio.h>
main()
{
Printf(M. Reddi Prasad Reddy,IP University,Delhi);
}
Note: to save the files click ESC and shift+: and wq! .so that your c program will be saved.
~/MyDocs/files $
gcc-4.2 hello.c // gcc compiler will compile your c program
~/MyDocs/files $
ls // you will find the output file
a.out hello.c
~/MyDocs/files $
sudo gainroot //shell root will be enabled
~home/usr/MyDocs/files #
cp a.out /usr/bin // to see the output you should copy this outputfile to bin folder
~/usr/bin #
chmod +x a.out // change the permissions
~/usr/bin #
./a.out
M. Reddi Prasad Reddy,IP University,Delhi
any other ideas and comments
Mail id:
reddy.mrp@gmail.com
Quote & Reply
|
The Following User Says Thank You to virusforu For This Useful Post:
lcuk
virusforu
View Public Profile
Send a private message to virusforu
Find all posts by virusforu