English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 24 September 2019, 17:27   #1
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
Earlier Compilers

What were first Amiga C compilers and could you install them on HD??

I am looking through some old fish floppies and wanting to compile some of the code myself on A500HD setup with WB 1.3.3.

I got Lattice C 3.03 (1985 according to TOSEC), but not clear how to compile with it. Only thing on S I found is how to strip workbench disk to make room for projects?!

I just found manual, going through it atm.

I remember hearing about Commodore compiler form that period (should be their version of Lattice C) but could not find anything on it.

ps. Edit - can mod remove ++ from title, it is just C compiler.

Last edited by Anubis; 24 September 2019 at 17:37.
Anubis is offline  
Old 24 September 2019, 17:41   #2
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,485
Quote:
Originally Posted by Anubis View Post
What were first Amiga C++ compilers and
Not sure. The latest SAS/C versions implemented an early C++ standard. And there was also Maxon C++?

Quote:
could you install them on HD??
I don't remember any compiler which didn't work from HD.

Quote:
I got Lattice C 3.03
Too old. There was no C++ at that time.
phx is offline  
Old 24 September 2019, 20:53   #3
nogginthenog
Amigan

 
Join Date: Feb 2012
Location: London
Posts: 887
Quote:
Originally Posted by phx View Post
Too old. There was no C++ at that time.
Probably would have been K&R syntax too!
DICE is usable on an A500 but it's from the early 90s.
nogginthenog is online now  
Old 24 September 2019, 22:56   #4
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
OK,

so far I tried to install lattice c 3.03. By install, I mean create LC folder, copy files from floppy, assign LC to directory, but I can't figure out how to assign include files. All include files are in different subfolders under include.

I've also installed Lattice 5.10 from zone, and this one had some scripts and once installed tells you how to modify it to make c++ work. This worked fine, but only works for files that are filename.cp - does not work for filename.c (attached image)

Does anyone has idea (or has script) how to setup Lattice 3.03 to work on WB 1.3??
Attached Thumbnails
Click image for larger version

Name:	2019-09-24 15_47_36-[Amiga 500 HD.uae] - WinUAE.png
Views:	81
Size:	19.2 KB
ID:	64590  
Anubis is offline  
Old 25 September 2019, 03:28   #5
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,928
Manx/Aztec C was the main competitor to Lattice at the time.
idrougge is offline  
Old 25 September 2019, 10:19   #6
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 281
Quote:
Originally Posted by Anubis View Post
What were first Amiga C compilers and could you install them on HD??
My candidates would be the early Lattice (later SAS) C ompiler(s), and the Aztec/Manx compilers, probably version 3.42 or so. Manx had a pretty primitive optimizer (mostly peephole) and a pretty simple standard C library. It was relatively easy to use from floppy. Harddisks were too expensive for the arverage user these days.


It might be that metacomco also had a C compiler, but there was at least a BCPL compiler and a Basic interpreter.


Then, there was certainly a C compiler for 68K that has some relevance for the Amiga, and this is the Greenhill compiler. It run on Suns, and was at least the compiler for intuition, if not for a lot more for the early machines. Its math libraries were also the basis for mathieeedoubtrans (mostly unchanged greenhill C math library source code). It does not run natively on the Amiga.


Quote:
Originally Posted by Anubis View Post

I got Lattice C 3.03 (1985 according to TOSEC), but not clear how to compile with it. Only thing on S I found is how to strip workbench disk to make room for projects?!
This was normal for the days back then. You had a custom floppy setup with the compiler stages on it. If I recall correctly, lattice was using two stages, lc1 and lc2, followed by alink (back then, I do not know whether it already shipped with blink). lc1 stage was preprocessor and preprocessor, it created an intermediate "quad" file, lc2 was the code generator. I do not know whether it already had a compiler driver "lc" which called the binaries in the right order.





Quote:
Originally Posted by Anubis View Post

I remember hearing about Commodore compiler form that period (should be their version of Lattice C) but could not find anything on it.
CBM surely did not have their own compiler. That was beyond their capabilities. It was probably the greenhill C compiler, or the metacomco BCPL compiler for everything around Tripos (aka dos.library).

Last edited by Thomas Richter; 25 September 2019 at 12:42.
Thomas Richter is offline  
Old 25 September 2019, 11:01   #7
amiwolf
Registered User

 
Join Date: Aug 2015
Location: Emerald City
Posts: 70
Quote:
Originally Posted by Thomas Richter View Post
Quote:
Originally Posted by Anubis View Post
I remember hearing about Commodore compiler form that period (should be their version of Lattice C) but could not find anything on it.
CBM surely did not have their own compiler. That was beyond their capabilities. It was probably the greenhill C compiler, or the metacomco BCPL compiler for everything around Tripos (aka dos.library).
Amiga C by Commodore was of Lattice origin.

http://www.retro-commodore.eu/2018/1...ference-guide/
amiwolf is offline  
Old 25 September 2019, 12:44   #8
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 281
Quote:
Originally Posted by amiwolf View Post
Amiga C by Commodore was of Lattice origin.

http://www.retro-commodore.eu/2018/1...ference-guide/

Well, Lattice was (one of the) "inhouse compiler(s)" CBM had, but it was certainly not "by CBM", but (hopefully) licensed by them. The followup product SAS/C is still the Amiga C reference compiler.
Thomas Richter is offline  
Old 25 September 2019, 21:29   #9
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
Thank you all for replies!

I refreshed workbench and I am trying to install lattice C 3.03.

Here are steps:

Copied everything to LC folder

Made assignment in StartupII to point LC to LC folder on sys

Added LC/c to path

Here is what happens when I try to compile hello world program:



I am sure that include files are unable to find stdio.h, which is in subfolder include/lattice.

Trying to find any info/documentation - most of it is just focused on C commands, not on how to use floppy with compiler.
Anubis is offline  
Old 25 September 2019, 21:49   #10
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Are you sure that's the correct opening bracket on the first line? It looks like a round bracket to me. And shouldn't there be a space before it?

"Can't open quad file" means that "The second phase of the compiler was unable to open the quad file." Do you have QUAD assigned?

What happens if you remove the #include line? If the problem is in finding include files, then maybe you'll get a compile with a warning, proving that.

Last edited by deimos; 25 September 2019 at 21:55.
deimos is offline  
Old 25 September 2019, 22:03   #11
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
Yep, that was the problem and after I fixed it, just run into the same problem I had yesterday - can't find include file.



Thanks
Anubis is offline  
Old 25 September 2019, 22:13   #12
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by Anubis View Post
Yep, that was the problem and after I fixed it, just run into the same problem I had yesterday - can't find include file.



Thanks
Can you specify where the include files are on the command line with the -i option?

What are your settings for LC, INCLUDE, LIB and QUAD?
deimos is offline  
Old 25 September 2019, 22:37   #13
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
Nice part of running emulation, easy to create new config and try something else. I installed Lattice C 4.0 and compiled program without any issues. Funny is that I am using the same assign statements and stdio.h is in the same place (in include folder in lc directory - moved it there from lattice directory as that seems right place for file to be )



Still at loss why it does not compile on 3.03. Anyone else has 3.03 working?
Anubis is offline  
Old 25 September 2019, 22:45   #14
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
Quote:
Originally Posted by deimos View Post
Can you specify where the include files are on the command line with the -i option?

What are your settings for LC, INCLUDE, LIB and QUAD?
Here is structure:

DH0:LC
>>>>>C
>>>>>INCLUDE
>>>>>LIB

Path has sys:lc/c added.

Assigns are:

assign LC: sys:lc/c
assign INCLUDE: lc:/include
assign LIB: lc:/lib
assign QUAD: RAM:

Same structure works fine with 4.0.

Anubis is offline  
Old 25 September 2019, 23:07   #15
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Maybe 3.03 doesn't like the lc: in include and lib. Have you tried specifying them without refering to other assigns?
deimos is offline  
Old 26 September 2019, 00:48   #16
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
I will look into it...
Anubis is offline  
Old 26 September 2019, 11:43   #17
Hedeon
PPC Hacker

 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,093
Quote:
Originally Posted by Anubis View Post

Assigns are:

assign INCLUDE: lc:/include
assign LIB: lc:/lib

Is this supposed to work? Doesn't / make it go up one level in the dir structure? Otherwise try lc:include and lc:lib
Hedeon is offline  
Old 26 September 2019, 13:56   #18
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
/ always go one step back in directory structure, toward root, and I know it works, because I am able to access all those directories from Shell.
Anubis is offline  
Old 26 September 2019, 14:01   #19
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by Anubis View Post
/ always go one step back in directory structure, toward root, and I know it works, because I am able to access all those directories from Shell.
Maybe it works in the Shell, and in LC 4, but maybe LC 3 doesn't correctly expand the paths in the variables?
deimos is offline  
Old 26 September 2019, 16:59   #20
Anubis
Maj. Voodoo

Anubis's Avatar
 
Join Date: Jan 2005
Location: Raking Woods...
Age: 47
Posts: 2,849
Assignment statement is in StartupII script, so everything is all set before WB loads. I made change to include statement, and while compiler worked fine, it seems that linker does not get triggered automatically, and only thing that gets created is hello.o.



It seems that LC 3.03 is not looking at include: when looking for include files. Not sure how to find where lc is supposed to look. Not sure why linker did not start.
Anubis 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
C Compilers? Pheonix support.Apps 7 05 December 2016 19:06
problem installing an earlier version of AF sigi sorglos support.Amiga Forever 4 14 February 2013 18:07
Matt's look at WoW and earlier MUDs and MMOs mattbarton.exe Retrogaming General Discussion 4 07 December 2009 22:08
C++ Compilers where/what to get? Spadger request.Apps 18 05 May 2006 06:10
c compilers? kruwi request.Apps 1 25 April 2006 19:30

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 20:48.


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