maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Port of C++ compiler (https://talk.maemo.org/showthread.php?t=2915)

BruceL 2006-08-27 00:12

Port of C++ compiler
 
Has anyone gotten g++ to work on the 770? I am interested in writing small consol-based C++ programs on the 770 itself.

If no one has done this I am willing to put some time into doing it but I have never done a Linux port before (I am a soon-to-be-ex windows programmer). Where is the best place to start? Specifically, once I have a development platform for the 770 set up on my laptop, how can I learn about how gcc and g++ are structured and what files are necessary to build the compiler, etc.

Thanks for any tips or info about building or installing g++ !

Bruce

Serge 2006-08-27 00:49

Quote:

Originally Posted by BruceL
Thanks for any tips or info about building or installing g++ !

Run 'apt-get install gcc' as root on the device and gcc will be installed for you. You may not like the result though as gcc will run out of memory on compiling almost anything but trivial applications.

edit: actually run 'apt-get install g++' for getting c++ compiler :)

BruceL 2006-09-03 05:54

Thanks Serge,
I seem to remember C++ compilers that fit on a single floppy.
I wonder how hard it would be for me to make a scaled down version of g++ (or any c++ compiler)
I just need to write some small consol based code in c++.

Bruce

Serge 2006-09-03 06:14

I also remember times when C/C++ compilers required only a few MB of RAM to work fine. But modern compilers are developed for modern computers, so they use more memory as it is available anyway. Extra memory use probably allows more complicated optimizations and helps to produce better code.

But why don't you try just to crosscompile this small application? It is way easier and faster for development.

BruceL 2006-09-03 06:35

There are two reasons I don't want to cross compile. I want to write small programs while traveling. And in the long run I would really like for the 770 or a similar machine to be my only computer. I have a lot of work to do before that happens; for example I would like to be able to drive a full sized USB monitor.

Anyhow, the requirement I am currently working on is the ability to compile the short c++ programs I need to write. I'll probably do some tinkering with g++ and see if I think that approach is feasible.

Bruce

aleksandyr 2006-09-07 17:04

I could launch in to a long explanation of compiler theory, but I'd rather not ;)

Just use Python. Perfect for writing small apps on the go.

msaunby 2006-09-08 11:19

Python is a good choice, as will be ooRexx http://www.oorexx.org/ when I get around to building it for the new OS.

Why ooRexx? Loads of reasons - see the web page. What I like for use on the 770 is that it isn't case sensitive, few special characters, and doesn't depend on getting the indents right, so less messing about with fiddly keyboard stuff. It's almost pseudo-code that runs.

I strongly believe that good programmers always know many languages. They may have favourites, but true programming skill is in working with abstract ideas, not "language lawyer" stuff.

fpp 2006-09-08 13:52

Quite apart from its intrinsic merits, Python does have a head start on the 770 though, because the platform's designers not only made the port readily available, but also included various API bindings for the maemo/hildon environments. Thus you can not only write or reuse console scripts, but also true GUI apps, using PyGame, PyGTK or Eagle.

smith 2006-09-08 19:14

Do you have a 1GB memory card?

BruceL 2006-09-08 19:26

Python sounds like something to learn. But, It's c++ that I need. I'm not develpoing a maemo app but a mathematics utility that will eventually become a programming language.

Smith,
I don't have a 1 gb card. Do you have g++ working with one? I haven't been able to find one, though I haven't looked outside of retail.

Bruce


All times are GMT. The time now is 01:02.

vBulletin® Version 3.8.8