Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: kamiga on March 30, 2008, 05:55:21 PM
-
I've read most of the recent posts here. A fair bit of the links including in them are now dead, and it's only been a few months.
I'm familiar with C, C++, Java, etc on the PC platform. Good (free) compilers, IDEs, documentation, etc are all over the place for PC setups.
I'm interested in programming an A500 in C, which currently has KS3.0/WB3.1 on it.
Compilers: Use SAS/C? What's the latest available version?
Documentation on APIs etc? I have Libraries and Devices RKM. Is there an official place to get documentation?
Example code anyplace?
Any active Amiga programming communities, forums, websites?
Anything else I need to know to get started?
Required books?
Thanks
Keith
-
KS3.0 for an A500?
http://devplex.awardspace.biz/cubic/features.html
http://sun.hasenbraten.de/vbcc/
-
The best amiga programmer forum: http://utilitybase.com/
the best C compiler for amiga and amiga like system, as said alexh - vbcc.
-
The only thing missing from the current versions of VBCC is the lack of optimization of the switch statement and the fact that VBCC is not a C++ compiler.
GCC is also free and has those features added on but it is a pain to use.
SAS/C is extremely old and is only better than the others with regard to its source level debugger. The loops and the order of operations in an expression is all suboptimal code generation. All other features go to the other compilers.
So take your choice of compilers and let us know what you think.
-
I'd say go for the easiest compiler installation,however bad optimizations it may produce and start messing with coding,you can always switch to a better
compiler once you're used to AmigaOS API's and stuff to improve on executable results
-
kamiga wrote:
Documentation on APIs etc? I have Libraries and Devices RKM. Is there an official place to get documentation?
The Amiga Developer CD v2.1 is the official place to get documentation. It's updated for AmigaOS 3.5 (not 3.9). In addition to the RKMs you get a bunch of examples, historic documentation, some useful tools, etc. Unfortunately it's really badly organized. But I still think it's worth having. You can get it from amigakit or Vesalia. Possibly from other places as well.
Personally I use StormC4 for C++ coding. It's far from perfect, but I really like the project management features.
-
I've got a few links to C related tutorials/references on amigacoding.com. Not many yet, but it might help. They're on this page: http://www.amigacoding.com/index.php/C:Resources
-
> Compilers: Use SAS/C? What's the latest available version?
For native Amiga apps, SAS/C is the only way to go. To my knowledge, it is also the only compiler that you can use to create a shared function library (similar to a dll).
In addition to the other links that people have provided, you may also want to take a look at this site:
http://amidevcpp.amiga-world.de/
This is a very nice IDE with support for both the Amiga and AROS.
Be aware that C++ apps, even when generated by SAS/C, will be huge. Just for fun, I've coded some console apps using the C++ standard library using vectors, lists, streams, etc. Talk about MAJOR code bloat, a simple hello world app can go from a few thousand (a few HUNDRED if you know what you're doing) bytes to well over 400,000! Stick with asm or C.
> Documentation on APIs etc? I have Libraries and Devices RKM. Is there an official place to get documentation?
No OFFICIAL place to get documentation. The autodocs are handy, but not absolutely necessary. The RKM:Libraries manual that you already have is the best place to start.
> Example code anyplace?
The RKM:Libraries manual is the first place to start. It contains good examples for opening viewports, windows, screens, boopsi as well as tasks, messaging, etc. I would then try Aminet/dev for additionl source code and examples. It is a GREAT place to find code in asm, C, E and Modula-2. Although there is a lot of duplication, the Fred Fish (R.I.P. my friend) disks are also a good source for example code.
> Anything else I need to know to get started?
Just have fun... :-)
-
bburtonpa wrote:
> Compilers: Use SAS/C? What's the latest available version?
For native Amiga apps, SAS/C is the only way to go. To my knowledge, it is also the only compiler that you can use to create a function library (dll).
StormC also has the ability to create amigaos shared library targets.
-
Spellcoder, NICE wiki...
-
SAS's C++ part is pure crap, completly useless unless you have it on a very powerfull emulator. Actuall SAS doen't have a C++ compliler, it only has preprocceor spewing out gigantic pieces of C-code for even the simplest C++ code.
AFAIK even GCC can do libraries it may just not be that easy.