Amiga.org

Amiga computer related discussion => General chat about Amiga topics => Topic started by: 3246251196 on May 16, 2006, 09:47:25 PM

Title: Programming compiler
Post by: 3246251196 on May 16, 2006, 09:47:25 PM
just as you can download Borland C++ / Dev C++ - is there a similar download for the amiga. where i can install the compiler using WB3.0 ??
Title: Re: Programming compiler
Post by: InTheSand on May 16, 2006, 09:54:41 PM
Hi, you could check out DICE (http://www.obviously.com/dice/)...

 - Ali

EDIT: oops, looks like this is source only, requiring a compiler to compile the compiler! D'oh! :-)
Title: Re: Programming compiler
Post by: amigakit on May 16, 2006, 09:55:12 PM
There is StormC v4 (http://amigakit.leamancomputing.com/catalog/product_info.php?products_id=477) with a full IDE.
Title: Re: Programming compiler
Post by: amigakit on May 16, 2006, 09:55:30 PM
Without an IDE is the free GCC
Title: Re: Programming compiler
Post by: 3246251196 on May 16, 2006, 10:45:04 PM
hey, thanks. but my specs:

A1200 w/ HDD (boots to WB3.0) w/ DF0 and DF1

PCMCIA also

so i was thinking download a free compiler in the format which i can transfer to amiga and then install on amiga... ?

thanks
Title: Re: Programming compiler
Post by: Piru on May 16, 2006, 10:55:38 PM
@3246251196

You will have hard time with such stock setup. If you want to do programming still, I'd recommend WinUAE, at least until your system has some more "oomph". You could even make it so that the compile directory is shared and mounted with smbfs, then you could do testing using the A1200.

EDIT: Oops, W/ HDD, read W/O ;-)

It is possible though, I used to have special compressed devenv (SAS/C, though I think it was Lattice/C back then. I think it was before SAS institute bought it) on 3 floppies on my A500. It took months to set everything up so I woudln't need to swap disks all the time, though. It was a bit slow on 68000 and floppies only.

Oh that was fun... ;-)
Title: Re: Programming compiler
Post by: Karlos on May 16, 2006, 11:32:45 PM
@Piru

Yeah, I read that as without HDD and was about to post when I checked again.

As you say, a stock machine has lots of limitations when it comes to compiling anything non trivial. A hard drive is a must, as is a decent amount of RAM and preferably a faster CPU.
Title: Re: Programming compiler
Post by: 3246251196 on May 17, 2006, 12:01:28 AM
well i use my PC when i do C++. i just always wanted to do it on Amiga is all
Title: Re: Programming compiler
Post by: dillinger on May 17, 2006, 02:10:41 AM
1. Install Cygwin on your PC (http://www.cygwin.com/)

2. Install Zerohour's PC-based GCC Amiga cross-compiler. (http://http://www.zerohero.se/cross/os3.html)

3. Install WinUAE on your PC. Share a directory on your PC between WinUAE and your "real Amiga" using Samba and your  PCMCIA Ethernet card

4. Create your C/C++ sources using one of the many freely available code editors on the PC. (I use NotePad++ http://notepad-plus.sourceforge.net/uk/site.htm, but the choice is wide and varied)

5. Save your sources from the editor to the shared WinUAE folder.

6. Compile those sources with lightening fast speed using your Cygwin based Bash interface and the cross-compiler you installed in step #2. You might have to learn some "Makefile" basics, beforehand and create yourself a project Makefile. (depends how complex your project is, simple compiles will not need a Makefile)

7. Test the binary the cross-compiler outputs with your WinUAE set-up (installed in step #3). If the code crashes WinUAE...no problem! You can reset WinUAE and be back in action within a matter of seconds.

8. Once you are happy with the binary tests you have done in WinUAE, switch over to your "Real" Amiga and execute the exact same binary from the shared PC Samba directory for the “final test”.

This is the best _modern_ pipeline when it comes to compiling Amiga apps. Sure, you can setup a native Amiga environment, but you will find it clumsy and slow, particularly on an unexpanded a1200 compiling C++ sources. Crashes will also drive you around the bend when developing on a native Amiga, whereas GURUs in an instance of WinUAE running on a PC are a mere "irritant" :)
Title: Re: Programming compiler
Post by: Thomas on May 17, 2006, 07:11:23 AM

Dice C can be downloaded from Aminet: http://www.aminet.net/package.php?package=dev/c/dice-3.16.lha

It's a nice small and fast compiler for beginners. It runs on an unexpanded Kick 1.3 machine, so it should be happy on an A1200.

Bye,
Thomas
Title: Re: Programming compiler
Post by: 3246251196 on May 21, 2006, 07:03:53 PM
any c++ compilers out there, guys?
Title: Re: Programming compiler
Post by: Piru on May 21, 2006, 07:15:55 PM
g++ (gnu c++)

That will NOT run on stock A1200.
Title: Re: Programming compiler
Post by: 3246251196 on May 21, 2006, 07:26:22 PM
hmmm. NOT STOCK => what specs?
Title: Re: Programming compiler
Post by: SamuraiCrow on May 21, 2006, 09:18:33 PM
You'll need at least 4Megs of Fast RAM if not more, and a hard drive.
Title: Re: Programming compiler
Post by: 3246251196 on May 21, 2006, 09:54:14 PM
okay well i will have 4Mb FM tomorrow.


anyway, another question:

What is AmigaBasic? (i have version 1.2) its on my WB1.2 Disks (Extras)
Title: Re: Programming compiler
Post by: Piru on May 21, 2006, 10:00:22 PM
Quote
What is AmigaBasic? (i have version 1.2) its on my WB1.2 Disks (Extras)

It's basic for amiga, written by Microsoft. It's horribly buggy and it won't work on your A1200 without patching.

If you really want to run it, here's the patch:
PtchAmigaBASIC.lha (http://www.aminet.net/package.php?package=dev/misc/PtchAmigaBASIC.lha)

I can't remember if this was enough to make it run though, you still might need to turn off caches completely (cpu nocache iirc).
Title: Re: Programming compiler
Post by: 3246251196 on May 21, 2006, 10:08:19 PM
well i have my A500+ set up downstairs so i could use it on that.

i dont know the language for this though. it is a P language right?
Title: Re: Programming compiler
Post by: Piru on May 21, 2006, 10:19:35 PM
No, it's BASIC (http://en.wikipedia.org/wiki/BASIC).

Anyway, here's hilarious, but still somewhat useful quick reference to various programming languages: http://www.99-bottles-of-beer.net/

You can get quick idea of the structure and the syntax by just taking a look at the simple 99-bottles-of-beer code. :-)
Title: Re: Programming compiler
Post by: dillinger on May 21, 2006, 11:46:39 PM
Zerohour's cross-compiler includes g++.

if you want the same toolchain but native (running on your Amiga) this toolchain works well enough: http://www.kefren.be/. but as mentioned before, you'll need to beef-up your Amiga.