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):
#!/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