maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [resolved] porting command line c application (https://talk.maemo.org/showthread.php?t=57252)

erniadeldesktop 2010-06-27 10:38

[resolved] porting command line c application
 
Hi guys, I've an application in C that I would like to port on my n900. can anyone help me?
I suppose I just have to compile it with "armel" target, but is not trivial. I've searched the forums but the source I've has not the makefiles. I'm kind of lost...

deed 2010-06-27 10:48

Re: porting command line c application
 
Copy your source files on the n900, install gcc (many ways... for me installing g++ from the sdk repos) then link, build and compile straight from the n900 xterm!

vivainio 2010-06-27 14:56

Re: porting command line c application
 
Quote:

Originally Posted by erniadeldesktop (Post 731132)
Hi guys, I've an application in C that I would like to port on my n900. can anyone help me?
I suppose I just have to compile it with "armel" target, but is not trivial. I've searched the forums but the source I've has not the makefiles. I'm kind of lost...

Try Nokia Qt SDK. You can use it to build command line programs as well. Just create a new project and add your source files there.

erniadeldesktop 2010-06-28 05:22

Re: porting command line c application
 
@deed: I was trying but i can't find it in the repositories, and i don't know the sdk one. could you give me the apt sources.list line?
@vivainio: just installed, I will try asap... but for what I see is c++ instead of c... and of course i get tons of errors.. I'm missing some option to compile c?

jaeezzy 2010-06-28 05:46

Re: porting command line c application
 
Quote:

Originally Posted by erniadeldesktop (Post 732189)
@deed: I was trying but i can't find it in the repositories, and i don't know the sdk one. could you give me the apt sources.list line?

deb http://repository.maemo.org/ fremantle/sdk free non-free
deb http://repository.maemo.org/ fremantle/tools free non-free

erniadeldesktop 2010-06-28 06:26

Re: porting command line c application
 
Quote:

Originally Posted by jaeezzy (Post 732203)
deb http://repository.maemo.org/ fremantle/sdk free non-free
deb http://repository.maemo.org/ fremantle/tools free non-free

404 not found...

edit: lol ... I wrote frEEmantle :)

vivainio 2010-06-28 07:30

Re: porting command line c application
 
Quote:

Originally Posted by erniadeldesktop (Post 732189)
@vivainio: just installed, I will try asap... but for what I see is c++ instead of c... and of course i get tons of errors.. I'm missing some option to compile c?

C++ compilers can compile almost all C code with no problems, or with little modifications.

pelago 2010-06-28 08:55

Re: porting command line c application
 
See the following thread for some things to be aware of when using the SDK repo on the device itself: http://talk.maemo.org/showthread.php?t=34412

erniadeldesktop 2010-06-28 12:14

Re: porting command line c application
 
ok.. i've managed to install build-essentials, and compiled. but now i've some weird issue for running the file: no way to run it. sh, bash myprog, even ./myprog fails. and the weirdest part is that chmod +x or chmod 777, even sudo chmod 777 doesnt work. (as well as chown) ... this is gross... I've also tried from the laptop via mass-storage...
Is driving me nuts...

vivainio 2010-06-28 12:17

Re: porting command line c application
 
Quote:

Originally Posted by erniadeldesktop (Post 732537)
even ./myprog fails. and the weirdest part is that chmod +x or chmod 777, even sudo chmod 777 doesnt work. (as well as chown) ... this is gross... I've also tried from the laptop via mass-storage...
Is driving me nuts...

Check your directory. Under ~/MyDocs, you can't +x a file, but in ~/ you can.

Still, this messing about is insane when you could just use Nokia Qt SDK.


All times are GMT. The time now is 11:59.

vBulletin® Version 3.8.8