I'll make this as descriptive as possible, just in case you don't understand a certain step. I was confused a bunch of times beforehand. So bear with this mini-tutorial. I recommend using Mamaich's version of PGCC, since it works extremely well with both C and C++. Vitaly's version doesn't work well with C++ and it is also not supported any more. Here's a semi-detailed order of what you need to do in order to get PGCC working (I learned the hard/pain-aching way

) :
*Before doing any of this, be sure to have at least 30mb of free space on your axim. It makes life so much easier.
1. Download
Mamaich's Version
2. If you don't have one, I would recommend using
winRAR to open up the file. I tried using Alzip to open it, and only half the files showed up. So I recommend using winRAR. And while you're at it, on the same link is a winRAR program for the pocket PC!
3. Download
PocketCMD and
PocketConsole. Other versions floating around the net are bad.
4. Install PocketCMD to your default directory. I'd say install it on the ppc, since people to to get errors when installing it on a storage card.
5. Install PocketConsole to your default directory as well. Be sure you install CMD first, and then Console second.
6. Download
the registry editor. In order for CMD to work, you need this. Install it on your ppc, and then run it. Select the following directory: HKEY_LOCAL_MACHINE\Drivers\Console. At the bottom of the screen select "OutputTo" and change the "Value Data" to 0 (zero). Click "OK" and close the program.
7. Soft re-boot your pocket PC. Just push the little button on the back.
8. Use winRAR to uncompress your pgcc.rar file onto your PC.
9. Copy the pgcc folder over to the root directory of your ppc. Before doing this, on your PC I would recommend opening up each folder in the pgcc folder and uncompressing all the .rar files. You could technically leave the .rar files in the pgcc folder and copy it over to your ppc, but compiling programs take forever.
10. Copy libc.dll and sdlgcc.dll to the "windows" folder directory on your ppc
Now you are all set! Get plugged into the
Yahoo! user group, since those guys provided lots of help for me.
For compiling, you can either use
this .bat file or
this .bat file.
The second one is my favorite. And as always, you could easily tweak it to suit your needs. If using the second .bat file, you should download the file to your computer (since it's easier to edit) and edit it in notepad. Edit the 2nd, 3rd, and 4th lines in the file to look exactly like this:
|
Code:
|
path \pgcc\bin
set src=\pgcc\samp\test\
set dest=\pgcc\samp\test\ |
After doing that, save the file and place it in the root directory of your ppc.
To compile, first create your source code and save it in a folder in the \pgcc\samp\ directory. For my example above, I created a folder named 'test'. If using a different folder, change the name above as well. Then, from your pocket pc, select Start -> Programs -> CMD. Type
|
Code:
|
compile <file name> <output name> con |
Don't be alarmed if you don't see anything on the console. I don't know how to fix it yet, but if you click on "Tools", then "Properties..." and then close the window, it'll show you what you typed. Anyways, the file name is obviously the name of your source code file. Include the extension .cpp. The output name is what you want your executable file to be called. And the the last argument "con" is the target type. With this specific .bat file, you can choose among the following targets: con, win, dll, and sdl. An example of how it should look is as follows:
|
Code:
|
compile test.cpp test con |
It'll compile and then all you have to do is open up the .exe file in your directory and it'll run. I tried to make this as informative as possible. Hopefully it helps. Also, sign up for the user group on Yahoo. People are constantly helping out and there are also other good resources there. Let me know if you need anything else.