GP2X .net 2005 Project Help


MadDog

Member
Joined
Mar 4, 2006
Messages
262
Age
55
Location
UK
Website
www.maddoggames.com
Wow, i've spent all weekend trying as many options as I can for a dev enviroment that'll be best for me. :) Also went to the lengths of trying to make a plugin for dotnet 2003. Almost but no cigar, the docs are awful for it.

Anyway, i'm giving 2005 a good bash now as I did not like the other IDE's. ( just a personal thing )
Got a lib building but when I link to it I get the following errors, looks like a data seg problem, this is a bit beyond my understanding of GCC and compilers. :unsure:

I'll go and google, just wanted to ask here too, Girlfriend is on her way round soon so running out of play time..... ;)

Got some other odd errors to do with new and delete. I'm also linking with stdc++

..\..\k9\lib\debug\libK9d.a: In function `__data_start':
../sysdeps/arm/elf/start.S(69): multiple definition of `__dso_handle'
c:/devkitgp2x/bin/../lib/gcc/arm-linux/4.0.2/crtbegin.o:(.data+0x0): first defined here
..\..\k9\lib\debug\libK9d.a: In function `_init':
../sysdeps/arm/elf/start.S(66): multiple definition of `_init'
c:/devkitgp2x/bin/../sysroot/usr/lib/crti.o:/home/davem/projects/gp2x/build/glibc-2.3.5/csu/crti.S(14): first defined here
..\..\k9\lib\debug\libK9d.a: In function `_start':
../sysdeps/arm/elf/start.S(66): multiple definition of `_start'
c:/devkitgp2x/bin/../sysroot/usr/lib/crt1.o:../sysdeps/arm/elf/start.S(66): first defined here
..\..\k9\lib\debug\libK9d.a: In function `_fini':
../sysdeps/arm/elf/start.S(66): multiple definition of `_fini'
c:/devkitgp2x/bin/../sysroot/usr/lib/crti.o:/home/davem/projects/gp2x/build/glibc-2.3.5/csu/crti.S:(.fini+0x0): first defined here
..\..\k9\lib\debug\libK9d.a:../sysdeps/arm/elf/start.S(66): multiple definition of `_IO_stdin_used'
c:/devkitgp2x/bin/../sysroot/usr/lib/crt1.o:../sysdeps/arm/elf/start.S(66): first defined here
..\..\k9\lib\debug\libK9d.a: In function `__data_start':
../sysdeps/arm/elf/start.S(66): multiple definition of `__data_start'
c:/devkitgp2x/bin/../sysroot/usr/lib/crt1.o:../sysdeps/arm/elf/start.S(66): first defined here
..\..\k9\lib\debug\libK9d.a: In function `K9::AllocVertexData(unsigned int)':
K9_Texture.cpp:(.text+0x2a1c): undefined reference to `operator new[](unsigned int)'
..\..\k9\lib\debug\libK9d.a: In function `K9::FreeVertexData(unsigned char*)':
K9_Texture.cpp:(.text+0x2a50): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::CommandBuffer::Open()':
K9_Texture.cpp:(.text+0x2a68): undefined reference to `operator new[](unsigned int)'
..\..\k9\lib\debug\libK9d.a: In function `K9::CommandBuffer::Close()':
K9_Texture.cpp:(.text+0x2b04): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `__tcf_0':
K9_Texture.cpp:(.text+0x2d00): undefined reference to `std::ios_base::Init::~Init()'
..\..\k9\lib\debug\libK9d.a: In function `__static_initialization_and_destruction_0(int, int)':
K9_Texture.cpp:(.text+0x2d44): undefined reference to `std::ios_base::Init::Init()'
..\..\k9\lib\debug\libK9d.a: In function `K9::Font::Font(char const*)':
K9_Texture.cpp:(.text+0x2f60): undefined reference to `operator new[](unsigned int)'
K9_Texture.cpp:(.text+0x3150): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Font::Alloc(char const*)':
K9_Texture.cpp:(.text+0x31cc): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x3244): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Font::Font(char const*)':
K9_Texture.cpp:(.text+0x33f0): undefined reference to `operator new[](unsigned int)'
K9_Texture.cpp:(.text+0x35e0): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Font::~Font()':
K9_Texture.cpp:(.text+0x3638): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::Font::~Font()':
K9_Texture.cpp:(.text+0x3674): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::Loader::~Loader()':
K9_Texture.cpp:(.text+0x3d70): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Loader::~Loader()':
K9_Texture.cpp:(.text+0x3ea8): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Loader::~Loader()':
K9_Texture.cpp:(.text+0x3fe0): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Loader::Loader(char const*)':
K9_Texture.cpp:(.text+0x41dc): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Loader::Loader(char const*)':
K9_Texture.cpp:(.text+0x42d4): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a:K9_Texture.cpp:(.text+0x43cc): more undefined references to `__gxx_personality_sj0' follow
..\..\k9\lib\debug\libK9d.a: In function `K9::LoaderTGA::~LoaderTGA()':
K9_Texture.cpp:(.text+0x4510): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::LoaderTGA::~LoaderTGA()':
K9_Texture.cpp:(.text+0x457c): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::LoaderTGA::~LoaderTGA()':
K9_Texture.cpp:(.text+0x45e8): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::LoaderTGA::Allocate(unsigned int, unsigned int, K9::LoaderTGA::Format)':
K9_Texture.cpp:(.text+0x46e8): undefined reference to `operator new[](unsigned int)'
..\..\k9\lib\debug\libK9d.a: In function `K9::LoaderTGA::Opened()':
K9_Texture.cpp:(.text+0x5074): undefined reference to `operator new[](unsigned int)'
..\..\k9\lib\debug\libK9d.a: In function `K9::Texture::Texture(int, int)':
K9_Texture.cpp:(.text+0x5580): undefined reference to `operator new[](unsigned int)'
..\..\k9\lib\debug\libK9d.a: In function `K9::Texture::Alloc(char const*)':
K9_Texture.cpp:(.text+0x563c): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x5750): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x58ac): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Texture::Alloc(int, int)':
K9_Texture.cpp:(.text+0x5920): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x599c): undefined reference to `__gxx_personality_sj0'
..\..\k9\lib\debug\libK9d.a: In function `K9::Texture::Texture(int, int)':
K9_Texture.cpp:(.text+0x59fc): undefined reference to `operator new[](unsigned int)'
..\..\k9\lib\debug\libK9d.a: In function `K9::Texture::~Texture()':
K9_Texture.cpp:(.text+0x5a74): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a: In function `K9::Texture::~Texture()':
K9_Texture.cpp:(.text+0x5ad0): undefined reference to `operator delete[](void*)'
..\..\k9\lib\debug\libK9d.a:(.gnu.linkonce.r._ZTIN2K96LoaderE[_ZTIN2K96LoaderE]+0x0): undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'
..\..\k9\lib\debug\libK9d.a:(.gnu.linkonce.r._ZTVN2K96LoaderE[_ZTVN2K96LoaderE]+0x10): undefined reference to `__cxa_pure_virtual'
..\..\k9\lib\debug\libK9d.a:(.gnu.linkonce.r._ZTVN2K96LoaderE[_ZTVN2K96LoaderE]+0x14): undefined reference to `__cxa_pure_virtual'
..\..\k9\lib\debug\libK9d.a:(.gnu.linkonce.r._ZTVN2K96LoaderE[_ZTVN2K96LoaderE]+0x18): undefined reference to `__cxa_pure_virtual'
..\..\k9\lib\debug\libK9d.a:(.gnu.linkonce.r._ZTIN2K96InFileE[_ZTIN2K96InFileE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
..\..\k9\lib\debug\libK9d.a:(.gnu.linkonce.r._ZTIN2K99LoaderTGAE[_ZTIN2K99LoaderTGAE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
 
Ok, I think I know where I went wong. I was running the link and ar for the lib. I take it that the link bit is only for the app and the ar bit only for the lib and not both at the same time?

I now get this, i've messed up some where else now. ;)

LINK : warning LNK4001: no object files specified; libraries used
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : fatal error LNK1561: entry point must be defined
 
This is real odd, I now get these errors, google is not helping. :(

C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_CommandBuffer.o): In function `K9::CommandBuffer::Open()':
K9_CommandBuffer.cpp:(.text+0x10): undefined reference to `operator new[](unsigned int)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_CommandBuffer.o): In function `K9::CommandBuffer::Close()':
K9_CommandBuffer.cpp:(.text+0xac): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Font.o): In function `K9::Font::Font(char const*)':
K9_Font.cpp:(.text+0x1a0): undefined reference to `operator new[](unsigned int)'
K9_Font.cpp:(.text+0x390): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Font.o): In function `K9::Font::Alloc(char const*)':
K9_Font.cpp:(.text+0x40c): undefined reference to `operator new(unsigned int)'
K9_Font.cpp:(.text+0x484): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Font.o): In function `K9::Font::Font(char const*)':
K9_Font.cpp:(.text+0x630): undefined reference to `operator new[](unsigned int)'
K9_Font.cpp:(.text+0x820): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Font.o): In function `K9::Font::~Font()':
K9_Font.cpp:(.text+0x878): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Font.o): In function `K9::Font::~Font()':
K9_Font.cpp:(.text+0x8b4): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Texture.o): In function `K9::Texture::Texture(int, int)':
K9_Texture.cpp:(.text+0x168): undefined reference to `operator new[](unsigned int)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Texture.o): In function `K9::Texture::Alloc(char const*)':
K9_Texture.cpp:(.text+0x224): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x338): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x494): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Texture.o): In function `K9::Texture::Alloc(int, int)':
K9_Texture.cpp:(.text+0x508): undefined reference to `operator new(unsigned int)'
K9_Texture.cpp:(.text+0x584): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Texture.o): In function `K9::Texture::Texture(int, int)':
K9_Texture.cpp:(.text+0x5e4): undefined reference to `operator new[](unsigned int)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Texture.o): In function `K9::Texture::~Texture()':
K9_Texture.cpp:(.text+0x65c): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Texture.o): In function `K9::Texture::~Texture()':
K9_Texture.cpp:(.text+0x6b8): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Api.o): In function `K9::AllocVertexData(unsigned int)':
K9_Api.cpp:(.text+0x4c): undefined reference to `operator new[](unsigned int)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Api.o): In function `K9::FreeVertexData(unsigned char*)':
K9_Api.cpp:(.text+0x80): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::LoaderTGA(char const*)':
K9_LoaderTGA.cpp:(.text+0xe8): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::LoaderTGA(char const*)':
K9_LoaderTGA.cpp:(.text+0x1e0): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::~LoaderTGA()':
K9_LoaderTGA.cpp:(.text+0x22c): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::~LoaderTGA()':
K9_LoaderTGA.cpp:(.text+0x298): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::~LoaderTGA()':
K9_LoaderTGA.cpp:(.text+0x304): undefined reference to `operator delete[](void*)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::Allocate(unsigned int, unsigned int, K9::LoaderTGA::Format)':
K9_LoaderTGA.cpp:(.text+0x404): undefined reference to `operator new[](unsigned int)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o): In function `K9::LoaderTGA::Opened()':
K9_LoaderTGA.cpp:(.text+0xd90): undefined reference to `operator new[](unsigned int)'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_LoaderTGA.o):(.gnu.linkonce.r._ZTIN2K99LoaderTGAE[_ZTIN2K99LoaderTGAE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o): In function `K9::Loader::~Loader()':
K9_Loader.cpp:(.text+0x1b0): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o): In function `K9::Loader::~Loader()':
K9_Loader.cpp:(.text+0x2e8): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o): In function `K9::Loader::~Loader()':
K9_Loader.cpp:(.text+0x420): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o): In function `K9::Loader::Loader(char const*)':
K9_Loader.cpp:(.text+0x61c): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o): In function `K9::Loader::Loader(char const*)':
K9_Loader.cpp:(.text+0x714): undefined reference to `__gxx_personality_sj0'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o):(.gnu.linkonce.r._ZTIN2K96LoaderE[_ZTIN2K96LoaderE]+0x0): undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o):(.gnu.linkonce.r._ZTVN2K96LoaderE[_ZTVN2K96LoaderE]+0x10): undefined reference to `__cxa_pure_virtual'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o):(.gnu.linkonce.r._ZTVN2K96LoaderE[_ZTVN2K96LoaderE]+0x14): undefined reference to `__cxa_pure_virtual'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o):(.gnu.linkonce.r._ZTVN2K96LoaderE[_ZTVN2K96LoaderE]+0x18): undefined reference to `__cxa_pure_virtual'
C:\GP2X\projects\K9\lib\debug\libK9d.a(K9_Loader.o):(.gnu.linkonce.r._ZTIN2K96InFileE[_ZTIN2K96InFileE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
 
'ar' creates a lib file. 'link' links the lib file and any other object files to your application.

It would be helpful to see the command lines that it is executing.
 
Yes, got it working! :) :)

It was my link order.

So, to recap my errors were....

'link' file and 'ar' in the lib project, not sure if the docs are clear that they are mutually exclusive.(correct me if i'm wrong on that)

Link order, need to link to your libs before the system ones.

Now to think what to do for the demo comp. :D
 
Back
Top