English Amiga Board


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

 
 
Thread Tools
Old 20 December 2017, 19:56   #1
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
Postal - Port to the Amiga - is there a decent C++ compiler ?

One of my favorite games is Postal by Running With Scissors. Its recently opened sourced and an ideal candidate for an Amiga port!

https://bitbucket.org/gopostal/postal-1-open-source

I can easily port Postal to the Amiga. I have even refactored all the SDL2 calls to SDL 1.2. I tested this with a quick original Xbox port that runs well using controllers and SDL1.2 - for a sneak peek (at 8:36 or so) - [ Show youtube player ]

The problem with the Amiga port is this code is all C++ and makes substantial use of STL (Standard Template Library) which isnt supported by any C++ compiler ive tried.

AmiDevCPP gives errors on <map>

Krystian Bacławski gcc gives me a constructor error

the closest ive gotten is beebos gcc/g++ 6.3.1b and that returns the following error

Code:
m68k-amigaos-g++ -c -o bin/AnimThing.o AnimThing.cpp -std=c++11 -m68020 -ffast-math -DAMIGA -DSYS_ENDIAN_BIG -fsigned-char -DPLATFORM_UNIX -w -DLOCALE=US -DTARG                             ET=POSTAL_2015 -I. -I./SDL2/include -I./RSPiX -I./RSPiX/Inc -I./RSPiX/Src -I./RS                             PiX/Src/BLUE -I./RSPiX/Src/BLUE/unix -I./RSPiX/Src/CYAN -I./RSPiX/Src/CYAN/Unix                              -I./RSPiX/Src/ORANGE -I./RSPiX/Src/ORANGE/CDT -I./RSPiX/Src/ORANGE/GameLib -I./R                             SPiX/Src/ORANGE/File -I./RSPiX/Src/ORANGE/Multigrid -I./RSPiX/Src/GREEN/Image -I                             ./WishPiX -I./WishPiX/Spry -DALLOW_TWINSTICK  -DNDEBUG -D_NDEBUG -O2
In file included from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             ext/string_conversions.h:43:0,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             bits/basic_string.h:5417,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             string:52,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             stdexcept:39,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             array:39,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             tuple:39,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             bits/stl_map.h:63,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             map:61,
                 from WishPiX/ResourceManager/resmgr.h:215,
                 from game.h:124,
                 from thing.h:270,
                 from hood.h:109,
                 from scene.h:180,
                 from realm.h:324,
                 from AnimThing.h:54,
                 from AnimThing.cpp:73:
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/cstdio:176:11: error:                              ‘::vfscanf’ has not been declared
   using ::vfscanf;
           ^~~~~~~
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/cstdio:186:22: error:                              ‘__gnu_cxx::vfscanf’ has not been declared
   using ::__gnu_cxx::vfscanf;
                      ^~~~~~~
am i wasting my time here? will we ever see a decent C++ Amiga compiler? I dont much care for rewriting all the C++ code as C
lantus360 is offline  
Old 20 December 2017, 20:06   #2
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I've got the same error with some project using gcc6.
in this case I switch to AmiDevCPP`s gcc3.4.0 - which sometimes helps, but may result in other errors.

you may try to use one of the gcc options in your makefile:
-noixemul or -mcrt=clib2 or -mcrt=nix13
maybe some other c++ standard may help: -std=c++03 instead of -std=c++11
perhaps one will work.

Last edited by emufan; 20 December 2017 at 20:12.
emufan is offline  
Old 20 December 2017, 20:09   #3
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
i get errors with STL:map with AmiDevCpp. This is normally my compiler of choice.

None of those flags help either, im hoping someone can tell me of a C++ m68k compiler that has complete STL support
lantus360 is offline  
Old 20 December 2017, 20:15   #4
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by lantus360 View Post
i get errors with STL:map with AmiDevCpp. This is normally my compiler of choice.

None of those flags help either, im hoping someone can tell me of a C++ m68k compiler that has complete STL support
so report it to bebbo, maybe he can fix this issue. dunno else.
emufan is offline  
Old 20 December 2017, 20:24   #5
grelbfarlk
Registered User
 
Join Date: Dec 2015
Location: USA
Posts: 2,902
I thought the same thing, and had less luck with g++ 2.95.3.
grelbfarlk is offline  
Old 01 January 2018, 12:40   #6
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 662
Try g++ version 4.3.2 or 4.5.0
arti is offline  
Old 02 January 2018, 15:43   #7
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
Quote:
Originally Posted by arti View Post
Try g++ version 4.3.2 or 4.5.0
can you tell me where i can find these for m68k ?
lantus360 is offline  
Old 02 January 2018, 23:30   #8
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 662
On amiga sourceforge.
arti is offline  
Old 03 January 2018, 20:28   #9
cla
dev
 
cla's Avatar
 
Join Date: Aug 2014
Location: Copenhagen
Age: 48
Posts: 65
Send a message via ICQ to cla
Quote:
Originally Posted by lantus360 View Post
is there a decent C++ compiler
Not in terms of C++17/14/11.
cla is offline  
Old 04 March 2018, 18:42   #10
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by lantus360 View Post
One of my favorite games is Postal by Running With Scissors. Its recently opened sourced and an ideal candidate for an Amiga port!

https://bitbucket.org/gopostal/postal-1-open-source

I can easily port Postal to the Amiga. I have even refactored all the SDL2 calls to SDL 1.2. I tested this with a quick original Xbox port that runs well using controllers and SDL1.2 - for a sneak peek (at 8:36 or so) - [ Show youtube player ]

The problem with the Amiga port is this code is all C++ and makes substantial use of STL (Standard Template Library) which isnt supported by any C++ compiler ive tried.

AmiDevCPP gives errors on <map>

Krystian Bacławski gcc gives me a constructor error

the closest ive gotten is beebos gcc/g++ 6.3.1b and that returns the following error

Code:
m68k-amigaos-g++ -c -o bin/AnimThing.o AnimThing.cpp -std=c++11 -m68020 -ffast-math -DAMIGA -DSYS_ENDIAN_BIG -fsigned-char -DPLATFORM_UNIX -w -DLOCALE=US -DTARG                             ET=POSTAL_2015 -I. -I./SDL2/include -I./RSPiX -I./RSPiX/Inc -I./RSPiX/Src -I./RS                             PiX/Src/BLUE -I./RSPiX/Src/BLUE/unix -I./RSPiX/Src/CYAN -I./RSPiX/Src/CYAN/Unix                              -I./RSPiX/Src/ORANGE -I./RSPiX/Src/ORANGE/CDT -I./RSPiX/Src/ORANGE/GameLib -I./R                             SPiX/Src/ORANGE/File -I./RSPiX/Src/ORANGE/Multigrid -I./RSPiX/Src/GREEN/Image -I                             ./WishPiX -I./WishPiX/Spry -DALLOW_TWINSTICK  -DNDEBUG -D_NDEBUG -O2
In file included from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             ext/string_conversions.h:43:0,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             bits/basic_string.h:5417,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             string:52,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             stdexcept:39,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             array:39,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             tuple:39,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             bits/stl_map.h:63,
                 from /opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/                             map:61,
                 from WishPiX/ResourceManager/resmgr.h:215,
                 from game.h:124,
                 from thing.h:270,
                 from hood.h:109,
                 from scene.h:180,
                 from realm.h:324,
                 from AnimThing.h:54,
                 from AnimThing.cpp:73:
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/cstdio:176:11: error:                              ‘::vfscanf’ has not been declared
   using ::vfscanf;
           ^~~~~~~
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/include/c++/cstdio:186:22: error:                              ‘__gnu_cxx::vfscanf’ has not been declared
   using ::__gnu_cxx::vfscanf;
                      ^~~~~~~
am i wasting my time here? will we ever see a decent C++ Amiga compiler? I dont much care for rewriting all the C++ code as C
add -noixemul and try the recent version from https://github.com/bebbo/amiga-gcc
bebbo is offline  
Old 08 March 2018, 23:34   #11
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
hi beebo, i will give it a try


thanks!
lantus360 is offline  
Old 09 March 2018, 20:56   #12
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
this compiler works much nicer, thanks Beebo !
lantus360 is offline  
Old 14 August 2020, 13:47   #13
Juz400
Registered User
 
Join Date: Mar 2017
Location: London
Posts: 125
Hi, regular watcher of your Utube channel
I am surprised there wasnt more interest in this 2 years ago, I have not played this one but Im a huge fan of Postal 2 all extras and the new Postal 4: No Regerts
We wont go into Postal 3 (Mistakes were made)

So everyone else knows what makes these games so much fun
[ Show youtube player ]

Was there too much C++ to convert over to Amiga or other projects took over as you are a pretty busy guy!
All the best,
J.
Juz400 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
Are there any decent Amiga stores??? th4t1guy Amiga scene 20 01 October 2022 20:41
Postal gone Open Source Shoonay Retrogaming General Discussion 1 29 December 2016 15:35
Any decent Amiga IDE? commodorejohn Coders. General 14 22 May 2013 22:37
amiga c/c++ compiler Fissuras request.Apps 41 18 June 2012 20:50
Best C Compiler for Amiga is? Pyromania Amiga scene 5 14 May 2002 17:17

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:05.

Top

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