English Amiga Board


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

 
 
Thread Tools
Old 26 October 2017, 15:44   #1
Steffest
Registered User

 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 44
Sas/C vs. GCC regarding graphics.library

Hi!

I'm doing some babysteps in C for the Amiga.
I created a simple test program with some BltBitMap actions.

When I compile it with Sas/C - it runs fine on a stock A500 - that's graphics.library 34, right?

When I compile the same source with GCC (gcc -noixemul blit.c -o blitgcc) it doesn't run on the A500 - displaying a message "Need version 37 of graphics.library"

The source and both binaries are at https://github.com/steffest/amiga-c/tree/master/blit

What is causing this GCC dependency and how do I avoid it ?

Thanks!
Steffest is offline  
AdSense AdSense  
Old 26 October 2017, 15:56   #2
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 988
Send a message via Yahoo to Samurai_Crow
If you don't open Graphics.library yourself, you don't get to pick the minimum version number. It picks Kickstart 2.04 as a default minimum for you. If you open Graphics.library when you open Intuition.library, then you can specify the ancient Kickstart version you want.

Sent from my Prism II using Tapatalk
Samurai_Crow is offline  
Old 26 October 2017, 16:27   #3
Steffest
Registered User

 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 44
Thanks!

Didn't know that.
Yay, another step! :-)
Steffest is offline  
Old 26 October 2017, 16:36   #4
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 988
Send a message via Yahoo to Samurai_Crow
You're welcome! Also, I would stick to version number 36 (Kickstart 1.3) or newer since Kickstart 1.1 was limited and only was used on the earliest A1000 model machines.

Sent from my Prism II using Tapatalk
Samurai_Crow is offline  
Old 26 October 2017, 16:53   #5
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,079
IIRC V36 is 2.0 and V34 is 1.3.
phx is offline  
Old 26 October 2017, 18:44   #6
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 47
Posts: 399
Actually, the standard C library (libnix) defaults to 2.04 as a requirement.
What version of gcc are you using? (gcc --version)

You could give -lnix13 a shot in linker flags, but what works 100% is to not use the standard library (use -nostdlib)

Have a look here http://eab.abime.net/showpost.php?p=910011&postcount=4
alkis is offline  
Old 26 October 2017, 20:19   #7
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 43
Posts: 988
Send a message via Yahoo to Samurai_Crow
Quote:
Originally Posted by phx View Post
IIRC V36 is 2.0 and V34 is 1.3.
Oh ok. You're probably right.

Sent from my ODROID-XU3 using Tapatalk
Samurai_Crow is offline  
Old 27 October 2017, 03:52   #8
Steffest
Registered User

 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 44
Quote:
Originally Posted by alkis View Post
What version of gcc are you using? (gcc --version)
I'm using gcc 2.95.3 from the ADE package ( http://aminet.net/package/dev/gcc/ADE )

Quote:
You could give -lnix13 a shot in linker flags, but what works 100% is to not use the standard library (use -nostdlib)

Have a look here http://eab.abime.net/showpost.php?p=910011&postcount=4
Thanks, my understanding of gcc is a lot better now.
After lot's of fiddling I got it to compile with the -nostdlib flag but it doesn't seem to be worth the effort.

I guess I'll stick with Sas/C for now for kickstart1.3 compatibility.
Steffest is offline  
AdSense AdSense  
 


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
GCC and ixemul.library Rixa Coders. Language 24 10 November 2016 23:18
Iff.library and gcc watertonian Coders. C/C++ 8 11 September 2015 08:23
(Useless benchmark) Dhrystone on Sas C/Gcc/Vbcc alkis Coders. System 3 16 October 2013 13:03
Making a shared library from a gcc .a library JoJo Coders. General 1 10 March 2003 19: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 12:53.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Page generated in 0.18313 seconds with 12 queries