English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 13 January 2019, 08:46   #1
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
StormC4 compilates not running on OS1.3

Hi all,
the title says it all.

I've tested it with a little C program. When I compile it with StormC4 gcc compiler the binary is not running on OS 1.3. On OS 2.04 and above it is running, though.

But the same little C program compiled with SAS-C does run fine on OS 1.3.

What could be the reason for this?
thyslo is offline  
Old 13 January 2019, 09:56   #2
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,630
There are some hunk types that aren't supported on OS1.x, maybe the StormC linker is emitting these.
Minuous is offline  
Old 13 January 2019, 11:00   #3
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Thank you, Minuous, that clears it
thyslo is offline  
Old 13 January 2019, 11:07   #4
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Either that, or the startup code opens a V36+ library.
Does it crash/freeze or return an error code? If so, look at the error code. With unsupported hunks LoadSeg will just refuse starting the executable.
phx is offline  
Old 13 January 2019, 11:25   #5
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Quote:
Originally Posted by phx View Post
Does it crash/freeze or return an error code?
It exits normally without an error code . It just does nothing. This happens regardless if started from Workbench or from CLI.

By the way / slightly off-topic: With StormC4 I'm not able to return an error code to the CLI. If I "return 20;" from main() the CLI takes this as an normal program termination. When I then type "Why" it states that the last command did not set an error code.

But I vaguely remember that I read somewhere that it is the normal behavior of StormC to not set return codes back to CLI at all.
thyslo is offline  
Old 13 January 2019, 11:42   #6
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
The Why command does not examine the return code, it examines the IoErr code. What you return from the main() function can only be used in scripts with IF WARN/ERRROR/FAIL:

0 = OK
5 = WARN
10 = ERROR
20 = FAIL

To set the IoErr for Why in 1.3 you have to poke the value into the corresponding fields of the Process and CommandLineInterface structures.
thomas is offline  
Old 13 January 2019, 13:50   #7
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Many thanks, Thomas, for bringing clarity to this!
thyslo 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
StormC4 - floating-point number emufan Coders. C/C++ 0 11 November 2017 21:32
OS1.3 Shell Tools (WShell 2 et al) marduk_kurios support.Apps 11 13 February 2014 20:15
REQ: StormC4 Compiler nizchka request.Apps 6 26 May 2008 21:40
stormc4 help forumbase support.Apps 2 06 March 2006 02:12
StormC4/GCC JoJo Coders. General 0 28 October 2002 09:38

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 22:39.

Top

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