Joined: 6-May-2007 Posts: 11226
From: Greensborough, Australia
@broadblues
Quote:
It doesn't need any includes. All the functions have been declared, so it would build, but it would need linking against a libamiga to get the library call stubs.
It's made for SAS/Lattice C so dependant on that enviroment. Fine if you have that but otherwise an Amiga C program that isn't Amiga C portable by itself.
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England
@Hypex
It would complie with gcc if you had a libstubs.a or an libamiga.a with stubs built in.
It's not great example, but's not wrong per seh, the biggst flaw with the example is because of not using includes the example can not grow inot a more compex program without starting from scratch.
On the other and if include were used they would be the wrong ones for modern usage.
Joined: 6-May-2007 Posts: 11226
From: Greensborough, Australia
@broadblues
I've got GCC from ADCD2.1 installed but the GUI tends to crash. So haven't touched that in years. OTOH I found I had SAS/C installed but the sc command didn't like it and gave warnings against missing prototypes. Still when I told it to link it created an executable. It worked. Okay for back then but as you showed not good for now.