English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 08 December 2021, 02:13   #1
johnhkc
Registered User

 
Join Date: Dec 2021
Location: Kansas City
Posts: 10
Compile all then link in SAS/C?

Using SAS/C, whether I double-click Build or do a "sc:c/smake" from the shell, it compiles one file, tries to link and then errors out when it can't find some extern symbols. Is there a setting that will compile everything first and then link?
johnhkc is offline  
Old 08 December 2021, 13:31   #2
deimos
It's coming back!

deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
Quote:
Originally Posted by johnhkc View Post
Using SAS/C, whether I double-click Build or do a "sc:c/smake" from the shell, it compiles one file, tries to link and then errors out when it can't find some extern symbols. Is there a setting that will compile everything first and then link?
My guess is that it's using a makefile, and that you need to list all the objects you want to build in that?
deimos is offline  
Old 10 December 2021, 00:49   #3
johnhkc
Registered User

 
Join Date: Dec 2021
Location: Kansas City
Posts: 10
Quote:
Originally Posted by deimos View Post
My guess is that it's using a makefile, and that you need to list all the objects you want to build in that?

But it will only compile one file at a time even if I delete #?.o
Does this look right?



#
# Makefile automatically generated by MKMK V6.55
# Fri Jun 26 19:07:55 1998
#

CFLAGS = StringMerge UnsignedChars \
CommentNest ErrorRexx NoMultipleIncludes \
StructureEquivalence NoIcons GenProtoParameters \
MultipleCharacterConstants STREQ noOPTIMIZE \
MemorySize=Huge IDLen=64 debug=FULL

OBJS= AppAttributes.o ARexx.o Attributes.o ClassBrowser.o data.o GUIElement.o jmh.o MAIN.o MenuEditor.o OOGA.o ProjectTree.o Startup.o

OOGA: $(OBJS)
sc $(CFLAGS) link to OOGAOO with <<
$(OBJS)
<

AppAttributes.o: AppAttributes.c AppAttributes.h common.h

ARexx.o: ARexx.c ARexx.h common.h

Attributes.o: Attributes.c Attributes.h common.h

ClassBrowser.o: ClassBrowser.c ClassBrowser.h common.h

data.o: data.c data.h ooga.h common.h

GUIElement.o: GUIElement.c GUIElement.h common.h

jmh.o: jmh.c common.h

MAIN.o: MAIN.C common.h

MenuEditor.o: MenuEditor.c MenuEditor.h common.h

OOGA.o: OOGA.c OOGA.h common.h

ProjectTree.o: ProjectTree.c ProjectTree.h Attributes.h common.h

Startup.o: Startup.c Startup.h common.h
johnhkc is offline  
Old 10 December 2021, 10:39   #4
deimos
It's coming back!

deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
I can only guess that the << $(OBJS) < bit isn't working as expected. It could be something as silly as the spaces around your equals signs.

The end of this page http://www.pjhutchison.org/tutorial/sas_c.html gives an example that doesn't use that but lists the objects explicitly. I'd try copying that style first.

Or try regenerating it with mkmk.

I'm sure someone else knows the answer. Maybe it's not your makefile at fault.
deimos is offline  
Old 12 December 2021, 20:48   #5
johnhkc
Registered User

 
Join Date: Dec 2021
Location: Kansas City
Posts: 10
None of that worked either. I tried the example on pjhutchison.org and to rebuild using mkmk. mkmk changed the file substantially but it still compiles and links one file then dies with:

*** SMAKE: Error return from child process ***
*** SMAKE: STOP ***
johnhkc is offline  
Old 12 December 2021, 21:41   #6
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 591
Do you have a SCOPTIONS file and if so, does it contain LINK option? Or if you run scopts, does it say Link or NoLink (under linker options)? Also, use scopts to change NoVerbose to Verbose to get more info about the build process.
Post build log, smakefile, SCOPTIONS, it's way too much guesswork. I didn't have any problems building the amiproc example from <sc_root>/examples/amiproc/ (with both existing and recreated smakefile).
Also, it's better to use [ code ] tag to avoid HTML reformatting for stuff like makefiles and code.
a/b 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
gcc sas/c link problem emufan Coders. C/C++ 6 23 July 2017 00:32
Help with compile JimDrew Coders. Language 23 30 October 2014 22:42
How compile WinUAE... WCoder support.WinUAE 57 17 April 2014 17:42
Compile WinUAE ????? Myriel support.WinUAE 14 10 January 2004 17:06

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 00:57.


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