GP32 Devkitpro Misery


M-.-n

Member
Joined
May 28, 2005
Messages
160
Location
Brussels, Belgium
Website
discodirt.10pm.org
Hi guys,

I'm in trouble and I don't understand what happens. I use to work with a packaged version of the arm-stuff & MrMirko's sdk.. everything was fine and I was pretty happy. Now, I thought I would be a good boy and upgrade to the latest version of devkitpro and I can't get it to work:

First of all, there's a minor confilicts in the headers. If I do include <stdio.h> & some other part happens to include <gp32.h> there's errors related to redefinitions of GPFILE & the smc_xxx routines. Not that this is a real big deal, I can update the headers, it is more as bug reporting.

Then, I can't get the thing to link. It seems all memory/string related routines are not found; I get thousands of undefined reference to:

> operator new (alltypes)
> opertator delete (all types)
> isalpha,atoi,strlen & related
> memcpy & related

then a couple of

> undefined reference to `__cxa_pure_virtual'
> undefined reference to `vtable for __cxxabiv1::__si_class_type_info'

The makefile structure should be ok since it is outside of the compiler scope. I am using:


CC = $(DEVARM)/bin/arm-elf-gcc
LD = $(DEVARM)/bin/arm-elf-gcc

CFLAGS = -Wall -O4 -s -mtune=arm9tdmi -fomit-frame-pointer\
-ffast-math \
-fno-exceptions \
-c -DPLATFORM_$(PLATFORM)

and

LDFLAGS = -Wall -Wl,-Map,$(EXE).map -specs=gp32.specs

and I am using cygwin (not that it should matter really)

Can anybody tell me wtf is happening ? I'm really puzzled by this !!

Thanks a bunch
 
I'm not sure about the header problems you're having, but the linking problems I've seen before with gcc on other platforms. The problem is that you're asking the C compiler to do the linking, not the C++ compiler (all those functions that aren't found are part of the C++ runtime support library, which the C compiler does not know about). In your link stage, instead of running arm-elf-gcc, run arm-elf-g++, that should fix your linking problems. In fact, I bet that if you run arm-elf-g++ for all compilation stages your header problems will go away too.
 
Yeah I tried to use the latest version yesterday, what a nightmare. Do you know you can't use // for comments any more...Rubbish. It was very quickly removed and replaced with r14.
 
I finally managed to get everything working by:

+> Compiling everything with the latest g++ ; but ;
+> Using the old headers
+> Doing the linking stage with the old structure

'ts kind-o-repelling-method but I had a bit of code that caused the old g++ to get an internal error so I sort of had to move to a newer one. Now I need to check thoroughly the .fxe is behaving correctly but it seems so.

More on later.

PS: codesmith ; I had tried that but it ain't workin'
 
Reesy posted on Sep 24 2005 at 09:39 PM said:
Yeah I tried to use the latest version yesterday, what a nightmare. Do you know you can't use // for comments any more...Rubbish. It was very quickly removed and replaced with r14.

I have absolutely no idea where you got that idea from. // works fine
 
Last edited by a moderator:
M-.-n posted on Sep 23 2005 at 08:46 AM said:
Hi guys,

I'm in trouble and I don't understand what happens. I use to work with a packaged version of the arm-stuff & MrMirko's sdk.. everything was fine and I was pretty happy. Now, I thought I would be a good boy and upgrade to the latest version of devkitpro and I can't get it to work:

First of all, there's a minor confilicts in the headers. If I do include <stdio.h> & some other part happens to include <gp32.h> there's errors related to redefinitions of GPFILE & the smc_xxx routines. Not that this is a real big deal, I can update the headers, it is more as bug reporting.

I'm working on fixing this one. MrMirko's method of overriding standard library functions using #defines doesn't work.

Then, I can't get the thing to link. It seems all memory/string related routines are not found; I get thousands of undefined reference to:

> operator new (alltypes)
> opertator delete (all types)
> isalpha,atoi,strlen & related
> memcpy & related

then a couple of

> undefined reference to `__cxa_pure_virtual'
> undefined reference to `vtable for __cxxabiv1::__si_class_type_info'

The makefile structure should be ok since it is outside of the compiler scope. I am using:


all of these errors are due to using gcc to link a C++ project. Using arm-elf-g++ to compile and link will fix them all.

I've mailed you a makefile which builds your project without errors, hopefully the result works.
 
Last edited by a moderator:
WinterMute posted on Sep 30 2005 at 11:34 AM said:
all of these errors are due to using gcc to link a C++ project. Using arm-elf-g++ to compile and link will fix them all.

I've mailed you a makefile which builds your project without errors, hopefully the result works.

too rite. indeed it works. thanks for the makefile !
Cheers,
Marc
 
Last edited by a moderator:
Back
Top