Active Topics

 


Reply
Thread Tools
BruceL's Avatar
Posts: 305 | Thanked: 154 times | Joined on Aug 2006 @ Colorado
#1
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
 
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#2
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's Avatar
Posts: 305 | Thanked: 154 times | Joined on Aug 2006 @ Colorado
#3
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
 
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#4
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's Avatar
Posts: 305 | Thanked: 154 times | Joined on Aug 2006 @ Colorado
#5
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
 
Posts: 474 | Thanked: 30 times | Joined on Jan 2006
#6
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.
 
Posts: 78 | Thanked: 9 times | Joined on Dec 2005 @ Devon, UK
#7
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's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#8
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.
 
Posts: 24 | Thanked: 0 times | Joined on Jan 2006
#9
Do you have a 1GB memory card?
 
BruceL's Avatar
Posts: 305 | Thanked: 154 times | Joined on Aug 2006 @ Colorado
#10
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:00.