Thread
:
On-device development in C/C++?
View Single Post
virusforu
2011-07-08 , 18:05
Posts: 7 | Thanked: 2 times | Joined on Apr 2010 @ Delhi
#
80
Corrected POST:
Thank you JOORIN for your comments
~ $ cd ~/MyDocs //change to this folder in N900 in xterm
~/MyDocs $ cd files //here your above files are copied
~/MyDocs/files $ sudo gainroot //shell root will be enabled
~home/usr/MyDocs/files # dpkg –i * // to run all the files in files folder
~home/usr/MyDocs/files # vi hello.c //create a c program by using vi editor
Note : for entering any letter you should press “I” to enter in to insert mode
#include <stdio.h>
main()
{
Printf(“M. Reddi Prasad Reddy,IP University,Delhi”);
}
Note:ESC leaves insertion mode. The command to save and quit is "wq" by itself and one enters command mode using ":".
~home/usr/MyDocs/files # gcc-4.2 hello.c // gcc compiler will compile your c program
~home/usr/MyDocs/files # ls // you will find the output file
a.out hello.c
~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
I have modified the post. this can help people little
i have saved the a.out to /usr/bin to execute otherwise its not able to get the permissions.
Q: but still some other N900 devices are not able to install gcc.
Quote & Reply
|
virusforu
View Public Profile
Send a private message to virusforu
Find all posts by virusforu