English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 17 August 2018, 00:55   #1
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
AmiDevCpp upgrade

Hi, which is the easiest way to replace the old GCC from AmiDevCpp by GCC 6?

I searched for any tutorials to upgrade the AmiDevCpp version of GCC but didn´t found any
AlfaRomeo is offline  
Old 17 August 2018, 09:20   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
I could do it in a few steps.

First, download setup & install in default location: https://github.com/SteveMoody73/amiga-gcc/releases

Then change only in "Tools / Compiler options" as follows

Create a new compiler (don't change anything else)

Click image for larger version

Name:	options1_new_compiler.PNG
Views:	295
Size:	12.4 KB
ID:	59324

and set its path to point on the new compiler on next tab (don't change anything else)

Click image for larger version

Name:	options2_binaries.PNG
Views:	283
Size:	10.1 KB
ID:	59325

then clean the dirs of all tabs (libs, includes, ...). Tedious as there are a lot and you can remove them one at a time only... Add them if you have extra libs. Not for now...

Click image for larger version

Name:	options3_dirs.PNG
Views:	257
Size:	11.7 KB
ID:	59326

change executable names (as they have now the proper cross prefix: m68k-amigaos-). I have also changed the debugger, but I must admit I didn't try it, but I saw someone debugging from Eclipse, so why not from AmiDevCPP?

Click image for larger version

Name:	options4_exe_names.PNG
Views:	266
Size:	12.2 KB
ID:	59327

Simple enough ?

Of course, in your project, now choose this compiler.

(I suppose that we could configure the standard Code::Blocks exactly the same way BTW). Although, I must say that I don't consider Code::Blocks as top notch either.

In a few months maybe I'll be able to recommend you a better environment as Gnat Programming Studio / gprbuild (that I currently use in both professional & leisure environments for Windows AND Amiga cross dev, but the free version isn't so great yet, since they usually release the free versions once a year to the FSF and they want their customers to keep the advantage).

Last edited by jotd; 17 August 2018 at 09:25.
jotd is offline  
Old 17 August 2018, 23:56   #3
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Thanks for your help jotd

Your steps seems easy, will try them during the weekend

Last edited by AlfaRomeo; 18 August 2018 at 00:01.
AlfaRomeo is offline  
Old 18 August 2018, 20:02   #4
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Already installed GCC 6 and all runs well but when I run a SDL example code the compiler give the error: "cannot find -lSDLstub"
I googled about but didn´t find anything useful about any SDLstub library.
So I tried to remove the "-lSDLstub" from the Linker Parameters and the compiler give those errors:
Click image for larger version

Name:	GCC 6 errors_3.jpg
Views:	242
Size:	43.0 KB
ID:	59388
I copied SDL includes folder inside sys-include folder but still with same errors
Click image for larger version

Name:	GCC 6 errors_4.jpg
Views:	265
Size:	83.4 KB
ID:	59387

Any ideas?
AlfaRomeo is offline  
Old 18 August 2018, 21:48   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
SDL is built-in in GCC6. But You have to add -lSDL not SDLstub. Also add -ldebug to define kprintf.
Finally, I found out that the "signal" function wasn't defined. I stubbed it (empty) and it linked and worked.
jotd is offline  
Old 18 August 2018, 22:47   #6
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Thanks jotd
It worked without SDLstubs with some compiler warnings.
I included that lib because I already included it when compiled sdl code in the original version of AmiDevCpp and allways worked.
AlfaRomeo is offline  
Old 18 August 2018, 22:59   #7
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
This GCC 6 Amiga port & packaging is just great. One example? ok

Code:
for(;;);
translates to

Code:
.here
   bra.b  .here     ; $60FE
You may be disappointed by SDL performance as it needs 8 bit display (for the buffer) then performs a c2p conversion: no so fast (but beats graphics lib PutPixel ). The AGA hack is supposed to be better performance-wise (probably because it has a better c2p conversion), I didn't try it. I'm currently trying to get rid of SDL.
jotd is offline  
Old 18 August 2018, 23:35   #8
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Quote:
Originally Posted by jotd View Post
You may be disappointed by SDL performance ...
SDL will be allways slow in classic amiga
AlfaRomeo is offline  
Old 19 August 2018, 09:33   #9
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
but it's interesting to quickly port some alien software, fire it on winuae with JIT and there it flies. Disheartening when you remove JIT ...

for me the magic moment was: 1. install GCC 6 with the setup, 2. connect it to my ide in a few minutes and 3. get an amiga executable.... on Windows...
Unthinkable even a few years ago, specially the "non-cygwin" part, which allows to use compiler in native batch scripts, python, you name it.
jotd 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
AmiDevCpp AlfaRomeo request.Apps 10 05 May 2019 17:58
AmiDevCpp - sprites problem milikabdp Coders. C/C++ 24 28 September 2017 14:23
AmiDevCpp $(GLOBALDEPS) mritter0 Coders. C/C++ 1 29 June 2015 01:30
AmiDevCpp AF2013 Coders. C/C++ 0 14 March 2014 00:23
AmiDevCpp and Floats AmigaEd Coders. General 0 18 January 2006 03:16

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 16:35.

Top

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