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).

I've found that I prefer ZGCC -- mainly because the installation is less intrusive and easier to clean up should you decide you want to remove it later. If you'd rather go the dev-img route, perhaps someone else can offer guidance on that.

Prerequisites:

The first thing you should do is get the latest ZGCC from this site. You'll need both the binaries image and the include files image. If you got ZGCC from some other site, it may not be the latest version and the instructions below may not work.

You're also going to need an SD card to put this stuff on (cramfs images cause all kinds of problems if you mount them from CF and then suspend your Z). You'll need enough free space for both images (minumum 9MB). The card does not have to be ext2/ext3 formatted -- FAT16/FAT32 will work just fine.

You have an SL-5600 so you shouldn't have to worry too much about your ROM version (unless you're using OZ ... then you'll have to find an OZ person to advise you).

You will have to do a bunch of command line stuff, so you need to have a terminal program (such as EmbeddedKonsole) installed.

Instructions:

Put both images in the root of your SD card and then follow these instructionscarefully. You'll most likely want to use the steps described under Option 1 then do the steps under Configuring the Compiler. The process is not simple, but the instructions are very good and if you follow them exactly, everything will work fine. If you have problems, post the details of the step that's tripping you up and the results you're getting, and I'll try to offer suggestions.

Caveats:

Note that there are no fancy IDEs to hold your hand when you're developing C/C++ on the Zaurus. It's good old-fashioned command line development. I don't know how they teach programming courses these days, but the majority of inexperienced programmers I meet seem to be completely lost without a GUI. You're going to have to write your source code in a text editor, save it, then go to a command shell and use a command like "gcc -o foo -lm foo.c" to build your program. If it doesn't work, you'll have to debug the hard way by sprinkling your code with debug printf statements or the slightly-less-hard way by using the GNU debugger (GDB). Don't get me wrong, all this stuff is perfectly usable and I actually prefer developing with command line tools, but it could be tough for a beginner (just learning C++ well is enough to tax most mortal humans ).

I just wanted to thank you for taking the time to respond back with such great detail. Once I get home from work I'm going to attempt it again. Actually the first intro course off c++ that I’m taking uses a GUI Borland compiler. The second advanced course uses Solaris and g++. Can you recommend any resources for learning g++ and or gcc? Thanks again, if there were more people like you the world would be a better place.

No need to thank me ... I'm just trying to pay back ZUG karma I've gotten a ton of good knowledge from other folks here so I try to return the favor when I can.

As for references, if you're learning C++, stay away from C books because they'll teach you bad habits. For C++ one of my favorite general references (though it's not gcc/g++ specific) is the Thinking in C++ two volume series by Bruce Eckel. I recommend it partly because it's quite good and partly because there's a free electronic version available. Put a copy on your Zaurus along with ZGCC and you have a complete mobile C++ programming lab

For g++ there's a decent g++ tutorial here and it contains links to some others such as a Linux commands tutorial. It's pretty basic, but that's what you want to get started. For the GNU Debugger (gdb) there's a good tutorial here. The GNU development tools gcc/g++/gdb contain a mountain of features that are documented in the man pages and online references, but it will likely be a while before you need even 1% of the features the tools have to offer

The instruction are asking me to write a script in my $PATH. How do I find $PATH?Should I be loged in as root (su) are as someone else when doing these procedures. What do I use to write the script (vi or notepad)? Like I said earlier I'm new to this, the procedure is making the assumption that there is an understanding of linux and or unix. In which I know just enough to get myself in to trouble.

$PATH is an environment variable that contains a list of directories that are automatically searched to find executables and scripts. When the instructions want you to do is write a script and put it in one of those directories. You can see what directories are in your path by doing and "export" at a shell prompt. However, I can tell you right now that the best place to put the script is /opt/QtPalmtop/bin. You will need to be root ("su" at the shell prompt) to write into that directory.

Your best bet for an editor is vi since it's guaranteed not to do anything strange with file names, end of line characters, etc. So the sequence of operations for this step is:

CODE

$ su# cd /opt/QtPalmtop/bin# vi mntzgcc.sh

If you haven't used vi before, the minimum you need to know is:

Hit "i" to get into insert mode

Type in the script

Hit "Cancel" (ESC) to get out of insert mode

Enter "ZZ" (two uppercase Zs) to save the file and exit

Or, if you're doing the cramfs install to SD and prefer the easy way out ...

Grab this IPK and install it and it will create all the scripts for you. This IPK assumes that you've put the two cramfs files in the root of your SD card. If you're trying to do an uncompressed install, you're on your own.

My IPK also has a couple of improvements in the mntzgcc.sh script. First, it automatically checks for the loop devices and creates them if they don't exist. This is handy on Sharp ROMs that only start with 2 loop devices after a reboot. The other thing is it allows you to easily unmount the zgcc filesystems. Just do a "mntzgcc.sh u" as root to unmount. You need to unmount anytime you want to eject your SD card.

Note that the mntzgcc.sh script in this package is executable so you don't have to "source" it, just run the script directly by entering "mntzgcc.sh" as root at a shell prompt. The zgcc.sh script on the other hand always has to be "sourced" (as described in the zgcc instructions).

Or, if you're doing the cramfs install to SD and prefer the easy way out ...

Grab this IPK and install it and it will create all the scripts for you. This IPK assumes that you've put the two cramfs files in the root of your SD card. If you're trying to do an uncompressed install, you're on your own.

My IPK also has a couple of improvements in the mntzgcc.sh script. First, it automatically checks for the loop devices and creates them if they don't exist. This is handy on Sharp ROMs that only start with 2 loop devices after a reboot. The other thing is it allows you to easily unmount the zgcc filesystems. Just do a "mntzgcc.sh u" as root to unmount. You need to unmount anytime you want to eject your SD card.

Note that the mntzgcc.sh script in this package is executable so you don't have to "source" it, just run the script directly by entering "mntzgcc.sh" as root at a shell prompt. The zgcc.sh script on the other hand always has to be "sourced" (as described in the zgcc instructions).[

Upon successful installation, you should have two directories, namely .zgcc and .include with all files included. If no files are found, i.e. the installation was not successful.

Try using "souce mntzgcc.sh" and post the contents of env here by issuing the following command:

env > env.tx

Thanks for your freizugheit!

Well....as usual, strange situation...those 2 directories are there on my SD card, but empty now. I know I saw files in them yesterday. However, my C3000 did freeze up last night and did have to reboot...

Tried using 'source mntzgcc.sh' and response was 'source: not found'.

No response to 'env > env.tx'.....

Any suggestions?

Since I have a C3000 with lots of storage should I try the uncompressed install method or wait till I get this situation working first?