English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Language (https://eab.abime.net/forumdisplay.php?f=114)
-   -   What C compiler to use? (https://eab.abime.net/showthread.php?t=85529)

-Acid- 12 January 2017 23:10

What C compiler to use?
 
Hi guys

I've never done any coding at all before (well except some basic cobol back in the early 90's) and want to make a start learning the basics on AGA Amigas. I intend to work through two books I have to begin with, Complete Amiga C by Cliff Ramshaw and Amiga C for Beginners by Abacus.

Which is the most suitable compiler that I should use these days? beyond the basics my opening goals are to create simple GUI launching programs to begin with (nothing too ambitious lol).

Any pointers would be great but remember.... complete beginner so keep it simple for me :)

Vairn 12 January 2017 23:51

Best suggestion would be to see if you can get the compiler which the books reference.

On the Amiga, probably easiest would be SAS/C.

For me, I use vbcc, cross-compiling under windows.
There is a native version for the amiga, but I like to use my familiar development environment.

Vairn 13 January 2017 00:02

Here is a post which has a setup vbcc toolchain for windows, if that helps :)

http://eab.abime.net/showthread.php?...highlight=VBCC

matthey 13 January 2017 00:04

"Amiga C for Beginners" uses Lattice C which became SAS/C. The latest version of this compiler is not free, no longer updated and comes without documentation but can be found (maybe even on this forum) if searching. It is probably your best bet on a real Amiga with low resources (CPU, memory and HD). Vbcc is a more modern C compiler which would suffice if you have the resources. It is easy to install for the Amiga, documentation is online, it is free for personal use and it is still developed.

http://sun.hasenbraten.de/vbcc/

Thorham 13 January 2017 00:05

Quote:

Originally Posted by Vairn (Post 1134277)
On the Amiga, probably easiest would be SAS/C.

:great

Daedalus 13 January 2017 00:24

Quote:

Originally Posted by -Acid- (Post 1134261)
Complete Amiga C by Cliff Ramshaw

I actually really like that book, I even brought my copy into Uni as a reference during programming labs, since most of the topics are platform agnostic. Got me some funny looks... It refers a lot to Dice C (a copy of which shipped with it), which is free to download and is reasonable, but quite old and I don't think comes with the 3.x/AGA includes. Still, for working through the examples it might be a good starting point before moving onto another compiler once you're comfortable with the basics.

The Amiga Developer CD 2.1 comes with Storm C and a lot of reference material, so that might be another option. Vbcc and SAS/C are quite popular these days. Basically you can't really go wrong if you stick to the big ones since they were all popular at some stage, so there should be a lot of information out there on them all.

demolition 13 January 2017 00:39

Unless you really really want to use a real Amiga for some reason, I would suggest you set up a cross compiler since native Amiga IDEs are very outdated compared to modern tools. For most tests you can then launch WinUAE and then only do tests on a real Amiga once in a while, just for sanity checks since WinUAE is quite accurate. :)

Thorham 13 January 2017 01:28

Quote:

Originally Posted by demolition (Post 1134290)
Unless you really really want to use a real Amiga for some reason, I would suggest you set up a cross compiler since native Amiga IDEs are very outdated compared to modern tools. For most tests you can then launch WinUAE and then only do tests on a real Amiga once in a while, just for sanity checks since WinUAE is quite accurate. :)

Not to mention the compilation speed being low when compiling larger projects. Just try compiling Lua5.3 with SASC6.58 on a 50mhz 68030 :lol

idrougge 13 January 2017 02:36

Yes, but this man is going to use it as he reads a book for C beginners. Compile times won't get in his way.

meynaf 13 January 2017 08:44

Quote:

Originally Posted by Thorham (Post 1134294)
Not to mention the compilation speed being low when compiling larger projects. Just try compiling Lua5.3 with SASC6.58 on a 50mhz 68030 :lol

I'm surprised it even compiles at all ;)

SAS C is quite Amiga friendly but VBCC is more accurate for current standards.

Thorham 13 January 2017 08:49

Quote:

Originally Posted by idrougge (Post 1134309)
Yes, but this man is going to use it as he reads a book for C beginners. Compile times won't get in his way.

Just a warning ;)

Quote:

Originally Posted by meynaf (Post 1134341)
I'm surprised it even compiles at all ;)

SAS C is quite Amiga friendly but VBCC is more accurate for current standards.

Lua5.3 is C89 with optional C99. It has a nice and simple config file where you can turn that C99 stuff off.

Locutus 13 January 2017 10:59

I've gotten Lua to run on some weirdo platforms like BSD2.11, its codebase is pretty nice for that.

Thorham 13 January 2017 11:06

Quote:

Originally Posted by Locutus (Post 1134365)
I've gotten Lua to run on some weirdo platforms like BSD2.11, its codebase is pretty nice for that.

It'll probably work on anything with enough memory and a C89 compiler.

plasmab 13 January 2017 19:41

Quote:

Originally Posted by matthey (Post 1134282)
"Amiga C for Beginners" uses Lattice C which became SAS/C. The latest version of this compiler is not free, no longer updated and comes without documentation but can be found (maybe even on this forum) if searching. It is probably your best bet on a real Amiga with low resources (CPU, memory and HD). Vbcc is a more modern C compiler which would suffice if you have the resources. It is easy to install for the Amiga, documentation is online, it is free for personal use and it is still developed.

http://sun.hasenbraten.de/vbcc/

I used vbcc and vasm for all my dev work nowadays.. even ported one of my old games over to that toolchain from devpac. Means i can cross compile on linux and launch in fs-uae

-Acid- 14 January 2017 00:19

Wow that was more replies than i expected! Looks like VBCC or SAS/C will suit my needs, do these come with the needed includes or will I need to get them from somewhere else?

To answer the question, I want to use my Amiga's to learn this as I'm trying to make myself use them more. I have an A4000 and A1200 with 060 in both set up next to my PC but they barely get used and I want to change that (got plans to try tracking at some point down the line too). So for now I think it's safe to say it'll be a long time before compile times will worry me :)

source 14 January 2017 00:42

Just a question but what is wrong with Storm C?

bubbob42 14 January 2017 01:14

Quote:

Originally Posted by -Acid- (Post 1134561)
Wow that was more replies than i expected! Looks like VBCC or SAS/C will suit my needs, do these come with the needed includes or will I need to get them from somewhere else?

Download the "current" NDK here:

http://os.amigaworld.de/download.php?id=3

Works with all versions of the OS.

matthey 14 January 2017 01:23

Quote:

Originally Posted by plasmab (Post 1134501)
I used vbcc and vasm for all my dev work nowadays.. even ported one of my old games over to that toolchain from devpac. Means i can cross compile on linux and launch in fs-uae

Yes. Vbcc is a cross compiler which is an advantage SAS/C does not have but not everyone needs.

Quote:

Originally Posted by -Acid- (Post 1134561)
Wow that was more replies than i expected! Looks like VBCC or SAS/C will suit my needs, do these come with the needed includes or will I need to get them from somewhere else?

The AmigaOS includes are available separately.

http://www.haage-partner.de/download/AmigaOS/NDK39.lha

Quote:

Originally Posted by source (Post 1134564)
Just a question but what is wrong with Storm C?

The old version of Storm C was buggy. The new version is based on an older version of GCC. The advantage of Storm C is an IDE but this also requires more resources. The disadvantage is an old (but good) version of GCC which is no longer supported. There is no best compiler for the 68k. With Amiga compilers, it is pick your poison and hope it is one you can tolerate.

Thorham 14 January 2017 02:00

Quote:

Originally Posted by -Acid- (Post 1134561)
Looks like VBCC or SAS/C will suit my needs, do these come with the needed includes or will I need to get them from somewhere else?

SAS/C 6.58 includes everything you need out of the box.

Quote:

Originally Posted by -Acid- (Post 1134561)
I have an A4000 and A1200 with 060 in both set up next to my PC but they barely get used and I want to change that (got plans to try tracking at some point down the line too). So for now I think it's safe to say it'll be a long time before compile times will worry me :)

With that 68060 and SAS/C, compile times will be good for small programs. VBCC shouldn't be too bad, either. Used to be much slower than it is now.

idrougge 14 January 2017 05:15

Quote:

Originally Posted by matthey (Post 1134576)
Yes. Vbcc is a cross compiler which is an advantage SAS/C does not have but not everyone needs.

There is always Vamos in case you want both compatibility and comfort.


All times are GMT +2. The time now is 14:33.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.07436 seconds with 11 queries