[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5348: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937)
Kiwi - a 68k Homebrew Computer • c++ compiler

c++ compiler

Assembler, C/C++ related topics
simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

c++ compiler

Postby simon » Tue Nov 11, 2014 8:12 am

Hi,

the builds a c and c++ cross compiler. I did some tests yesterday. m68k-elf-g++ compiles .cpp fine but when I try to run the generated .bas the Kiwi crashes.
I suspect a problem with the linker skript (kiwi.ld) and/or the c runtime library (crt0.S). Maybe the handling of constructors and destructors is buggy. At least I never touched that code and may did remove parts of it. I don't know...
Your help is highly appreciated. :)

Simon


SteveMoody
Developer
Posts: 276
Joined: Sat Mar 08, 2014 1:23 pm
Location: South Wales, UK
Contact:

Re: c++ compiler

Postby SteveMoody » Tue Nov 11, 2014 10:56 am

I tried writing some C++ code to test but i was getting problem in building it. I seemed to be getting quite a lot of linker issues. I assumed it was down to my toolchain.I didn't look into it much at the time.

It could be that if you're program is compiling but crashing on run that it is down to the constructor. I would guess that it needs to know where in RAM it can allocate memory.

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: c++ compiler

Postby simon » Tue Nov 11, 2014 1:47 pm

Yeah, that's what I think. The crt0 does some stuff with the constructors including setting up lists for later destructors. I may skip the whole c++ stuff again and start porting another c-written game. I still have some nice ideas. :-)


simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: c++ compiler

Postby simon » Sat Nov 15, 2014 4:27 pm

I found the issue. The _start is at a different address. In addition the address changes with different settings. I altered the Makefile to meet the new condition. Now we are able to use c++ with Kiwi. :)


linux68k
Developer
Posts: 59
Joined: Thu Feb 28, 2013 3:09 am

Re: c++ compiler

Postby linux68k » Sat Nov 15, 2014 7:01 pm

Hi Simon

Have you posted the updates to the make file?

Thanks
Tony

simon
Site Admin
Posts: 744
Joined: Thu Sep 13, 2012 9:35 am
Location: Luedenscheid, Germany
Contact:

Re: c++ compiler

Postby simon » Sat Nov 15, 2014 8:31 pm