Author Topic: On Z Development In C++  (Read 3831 times)

edsav00

  • Newbie
  • *
  • Posts: 5
    • View Profile
On Z Development In C++
« on: December 10, 2004, 08:32:57 pm »
Hi;

Please go easy on me.  I need someone to hold my hand with this.  I'm new to the Zaurus and Linux.  I'm taking C++ programing and would like to install a compiler on my sl-5600 zaurus.  I've tried installing zgcc 2.95.1 with no luck and dev_img-1.5 with no luck either.  Can someone please tell me what to install and how to install it (simplicticly).    

Thank you in advance,

Ed the NEWBEE

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
On Z Development In C++
« Reply #1 on: December 11, 2004, 11:59:06 am »
Are you aware that both installaton needs ext2 formatted SD storage?

Are you familiar Unix commands?

edsav00

  • Newbie
  • *
  • Posts: 5
    • View Profile
On Z Development In C++
« Reply #2 on: December 11, 2004, 02:29:01 pm »
I know some basic commands.  re: ext2, no I didn't know that.  The end result I would like is to be able to compile c++ on my Zaurus.  Could you provide me with a step-by-step procedure on how to install a compiler or IDE app?  I've downloaded some instruction but they assume the person reading knows the Zaurus and or Linux, which I do not, they talk about scripts and loop devices.  I'm lost.  I know it's time consuming but if you can help I would appreciate it.    

Thanks for responding,

-Ed

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
On Z Development In C++
« Reply #3 on: December 23, 2004, 12:19:36 pm »
I am trying to do almost the same thing (on my SL-5500), but I have been using Linux for a while, which helps a lot. I tried zgcc 2.95.1, but after a LOT of messing, realised that it would only do C (not C++), and even then with great difficulty.
The alternative is zgcc 2.02 (which is still tracking gcc 2.95.1) from Dr. Jeffrey R. Fox, available at:
http://s91215199.onlinehome.us/zaurus/
This should do C, C++ and Qt apps.
I haven't got it working properly on my Z, but I'll post solutions you may need as I find them.

In Linux, compiling relies heavily on links to find the right files. This is why you will definately need an ext2 or ext3 partition to install it on. You will also need a console/terminal app (if using the Sharp ROM there should be one on the cd). Tell me if you need to make an ext2 partition.

About loop devices, its sounds like you found the site above. The loop device is so that you can mount a filesystem which is on another filesystem (in this case, the cramfs file on whatever filesystem it is stored). To mount the cramfs filesystems, follow the instructions in the tutorial. If you get the message: 'Block device required' or something like that, use the commands:
losetup /dev/loop0 zgcc2Bin.cramfs
mount /dev/loop0 /mnt/card/.zgcc -t cramfs
losetup /dev/loop1 zgcc2Inc.cramfs
mount /dev/loop1 /mnt/card/.include -t cramfs

Type 'mount' (without the 's) to check that they have both been mounted properly.
Ignore the bit about mknod unless you are using other cramfs files as well.
If you are using mountpoints other than /mnt/card/.zgcc and /mnt/card/.include you will have to change a few things, tell me if this is the case.

The scripts are to set variables which change the options gcc uses and the places it searches for include files, etc. The best thing to do is put the following in a script (i called it mntzgcc):
Code: [Select]
#!/bin/sh
losetup /dev/loop0 zgcc2Bin.cramfs
mount /dev/loop0 /mnt/card/.zgcc -t cramfs
losetup /dev/loop1 zgcc2Inc.cramfs
mount /dev/loop1 /mnt/card/.include -t cramfs
/mnt/card/.zgcc/zgcc.sh

Make sure the script is in your $PATH. This is a variable which stores a list of directories which will be searched when you type a command. You can type 'echo $PATH' to find out which directories are in the path. /usr/bin/ is probably a good place to put it. The last line of the script runs the zgcc.sh script which was kindly put in the bin cramfs file for us.

Let me know how you get on, I'm going to see if I can get mine working properly.
Simon
« Last Edit: December 23, 2004, 12:21:35 pm by systemparadox »
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

metageek

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • http://www.thibault.org/
On Z Development In C++
« Reply #4 on: December 23, 2004, 04:01:21 pm »
Mind you, linking C++ on the Zaurus can be a problem--slow and memory-intensive.  It's not bad if you're doing command-line stuff, but I was never able to get anything with Qt to link unless I set up a swap file.  This was on a 5500.

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
On Z Development In C++
« Reply #5 on: December 23, 2004, 04:02:58 pm »
thanks for the info, ill watch out for that.
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.