English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 12 January 2017, 23:10   #1
-Acid-
Registered User
 
Join Date: Oct 2012
Location: South Shields
Posts: 812
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
-Acid- is offline  
Old 12 January 2017, 23:51   #2
Vairn
The Grim-Button
 
Vairn's Avatar
 
Join Date: Jan 2008
Location: Melbourne Australia
Age: 43
Posts: 414
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 is offline  
Old 13 January 2017, 00:02   #3
Vairn
The Grim-Button
 
Vairn's Avatar
 
Join Date: Jan 2008
Location: Melbourne Australia
Age: 43
Posts: 414
Here is a post which has a setup vbcc toolchain for windows, if that helps

http://eab.abime.net/showthread.php?...highlight=VBCC
Vairn is offline  
Old 13 January 2017, 00:04   #4
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
"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/
matthey is offline  
Old 13 January 2017, 00:05   #5
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by Vairn View Post
On the Amiga, probably easiest would be SAS/C.
Thorham is offline  
Old 13 January 2017, 00:24   #6
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Quote:
Originally Posted by -Acid- View Post
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.
Daedalus is online now  
Old 13 January 2017, 00:39   #7
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
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.
demolition is offline  
Old 13 January 2017, 01:28   #8
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by demolition View Post
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
Thorham is offline  
Old 13 January 2017, 02:36   #9
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
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.
idrougge is offline  
Old 13 January 2017, 08:44   #10
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Thorham View Post
Not to mention the compilation speed being low when compiling larger projects. Just try compiling Lua5.3 with SASC6.58 on a 50mhz 68030
I'm surprised it even compiles at all

SAS C is quite Amiga friendly but VBCC is more accurate for current standards.
meynaf is offline  
Old 13 January 2017, 08:49   #11
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by idrougge View Post
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 View Post
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.
Thorham is offline  
Old 13 January 2017, 10:59   #12
Locutus
Registered User
 
Join Date: Jul 2014
Location: Finland
Posts: 1,176
I've gotten Lua to run on some weirdo platforms like BSD2.11, its codebase is pretty nice for that.
Locutus is offline  
Old 13 January 2017, 11:06   #13
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by Locutus View Post
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.
Thorham is offline  
Old 13 January 2017, 19:41   #14
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by matthey View Post
"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
plasmab is offline  
Old 14 January 2017, 00:19   #15
-Acid-
Registered User
 
Join Date: Oct 2012
Location: South Shields
Posts: 812
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
-Acid- is offline  
Old 14 January 2017, 00:42   #16
source
Zone Friend
 
Join Date: Jul 2005
Location: Toronto, Canada
Posts: 734
Just a question but what is wrong with Storm C?
source is offline  
Old 14 January 2017, 01:14   #17
bubbob42
Registered User
 
Join Date: Oct 2012
Location: Germany
Posts: 585
Quote:
Originally Posted by -Acid- View Post
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.
bubbob42 is offline  
Old 14 January 2017, 01:23   #18
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by plasmab View Post
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- View Post
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 View Post
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.

Last edited by matthey; 14 January 2017 at 01:30.
matthey is offline  
Old 14 January 2017, 02:00   #19
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by -Acid- View Post
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- View Post
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.
Thorham is offline  
Old 14 January 2017, 05:15   #20
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Quote:
Originally Posted by matthey View Post
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.
idrougge is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A/C Compiler christianlucio request.Apps 4 25 September 2014 17:35
Compiler BinoX support.WinUAE 2 22 August 2014 13:10
De-compiler Sim085 support.Other 3 21 November 2013 11:15
amiga c/c++ compiler Fissuras request.Apps 41 18 June 2012 20:50
C compiler raptor_13 Coders. General 14 27 May 2008 09:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:09.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09954 seconds with 14 queries