English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 05 May 2020, 15:49   #1
kfasheldon
Registered User
 
Join Date: Oct 2006
Location: Ottawa, Canada
Posts: 42
Help Learning C as nothing works

Hello

I have a few good books on programming the Amiga from a long time ago.

So during this lock-down I though I would make some use of them after all these years but I having set up WinUAE with SAS/C 6.58 , HiSoftC 4 and VBCC I am having no luck with any of the example code in the books without having to jump through hoops to 'correct' odd things.

Is there a general rule as to what might have changed with regards to struc calls etc. since OS 1.3 and the Lattice/Aztec C days so that I can easily spot and adapt the newer ways.

The Books I'm trying to use are;

Abacus Amiga C for Beginners (WB 1.3 , Lattice C v4)
The Wait Groups Inside the Amiga With C (WB 1.3 /Lattice C)

I also have;

Amiga Programmers Handbook - Sysbex (WB 1.2)
Abacus Amiga System Programmers Guide (1989)

Clearly the problems are with regards calling and using libraries and includes as the methods seem to have changed and generate errors and warnings on compiling.

Either a guide to changes or a better source of tutorial material / books would be useful.

If anyone can help it would be appreciated.
Thanks
kfasheldon is offline  
Old 05 May 2020, 17:08   #2
Pyromania
Moderator

Pyromania's Avatar
 
Join Date: Jan 2002
Location: Chicago, IL
Posts: 2,450
What’s the best book for new Amiga C programmers in 2020? It would be nice if it focused on OS 3.1.4, OS 4.1 and MorphOS.
Pyromania is offline  
Old 05 May 2020, 18:12   #3
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 44
Posts: 9,076
Honestly, it might be better to look for more recent amiga books/documents online
BippyM is online now  
Old 05 May 2020, 19:36   #4
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 119
Post example source code (or photo).
Ami is offline  
Old 05 May 2020, 20:30   #5
kfasheldon
Registered User
 
Join Date: Oct 2006
Location: Ottawa, Canada
Posts: 42
Attached file i'm playing with, using the default framework from the excelent Atom editors Amiga profile in Windows . The framework works fine, I added the Open Window code and got it to work , but not if I place the Window def in any other area as I would have thought. For example in Inside the Amiga with see they set up a prototype to open the windows by passing paramaters so it can be used to open as many windows as you want , but if I set that function code up anywhere in the framework it does not work ans says that the prototype is not defined for the function.

So I put the code inline and it all worked.

Now I added a close gadget to the window, and copied the code to loop until this is pressed but the InuiMessage gets complained as being found expected Message, so I added the Structure of IntuiMessage and it still complains.

If anyone can explain why in simple terms I would be grateful.
Attached Files
File Type: c Window2.c (7.0 KB, 39 views)
kfasheldon is offline  
Old 05 May 2020, 20:57   #6
olleharstedt
Registered User

 
Join Date: Mar 2020
Location: Hamburg
Posts: 20
https://github.com/olleharstedt/amig...prite/sprite.c

Cross compile ^
olleharstedt is offline  
Old 05 May 2020, 21:22   #7
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 119
Typos.

Message not MESSAGE, excessive semicolons, etc. Look carefully what compiler outputs during compilation, there is often line number and explained type of error. Also, bad coding like using system functions without checking their result is asking for a troubles.
Ami 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
Help Learning kfasheldon Coders. C/C++ 7 29 April 2020 23:12
Learning C nobody Coders. C/C++ 28 15 June 2016 08:07
I need help with my intro... I´m learning... Skillion76 Coders. General 10 27 September 2014 17:36
Suggestions for learning pmc Coders. Tutorials 248 20 October 2010 21:42
Learning assembler bLAZER Coders. General 1 12 May 2007 05:00

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 23:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.07016 seconds with 15 queries