Bluetooth.h?

support for the powerpc toolchain
Post Reply
Josh @ Dreamland
Posts: 5
Joined: Mon May 18, 2009 12:37 am

Bluetooth.h?

Post by Josh @ Dreamland » Mon May 18, 2009 12:51 am

When I installed DevKit, it didn't come with bluetooth.h, which its examples use. So I brushed off, found BlueZ, installed it where it needed to be, and continued.

BlueZ has Linux dependencies. Cursed, brushed off, pawned the necessary headers off a friend.

Then, linker errors. Oh so many linker errors. I have it down to only a few. Scary, though, is that a few are from the OpenGL stuff, which I BELIEVE I linked to. The rest... I can't track down for the life of me.

I'm trying to compile DevKit's triangle example, in case that's pertinent.

Here's what I'm calling:

Command line 1:
C:\\devkitPro\\devkitPPC\\bin\\powerpc-gekko-g++.exe -c %s -o %s -I C:\\devkitPro\\libogc\\include -I C:\\devkitPro\\libogc\\include-windows

Sources (First %s):
C:\devkitPro\examples\wii\graphics\gx\triangle\source\triangle.c

Output file (Second %s):
"C:\Documents and Settings\HP_OWNER\Desktop\Out.o"

Include-windows contains the Linux headers I needed.
Anyway, this compiles it successfully. The problem arises when I link it like so:

Command line 2:
C:\\devkitPro\\devkitPPC\\bin\\powerpc-gekko-g++.exe %s -o %s -L C:\\devkitPro\\libogc\\lib\\wii -L C:\\devkitPro\\devkitPPC\\powerpc-gekko\\lib %s

First %s is just the last output file
Second is a different file in the same place
Third is the libraries to link. I used these:

-lwiiuse -lbte -logc -lm


And here are the linker errors...

Code: Select all

c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-gekko/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 018000a0
C:\devkitPro\libogc\lib\wii\libogc.a(lwp.o): In function `__lwp_sysinit':
lwp.c:(.text.__lwp_sysinit+0xaa): undefined reference to `__stack_end'
lwp.c:(.text.__lwp_sysinit+0xae): undefined reference to `__stack_addr'
lwp.c:(.text.__lwp_sysinit+0xb2): undefined reference to `__stack_end'
lwp.c:(.text.__lwp_sysinit+0xb6): undefined reference to `__stack_addr'
lwp.c:(.text.__lwp_sysinit+0xd6): undefined reference to `__crtmain'
lwp.c:(.text.__lwp_sysinit+0xde): undefined reference to `__crtmain'
C:\devkitPro\libogc\lib\wii\libogc.a(irq.o): In function `__irq_init':
irq.c:(.text.__irq_init+0x26): undefined reference to `__intrstack_addr'
irq.c:(.text.__irq_init+0x2e): undefined reference to `__intrstack_addr'
irq.c:(.text.__irq_init+0x3a): undefined reference to `__intrstack_end'
irq.c:(.text.__irq_init+0x46): undefined reference to `__intrstack_end'
C:\devkitPro\libogc\lib\wii\libogc.a(system.o): In function `SYS_Init':
system.c:(.text.SYS_Init+0x7a): undefined reference to `__gxregs'
system.c:(.text.SYS_Init+0x82): undefined reference to `__gxregs'
system.c:(.text.SYS_Init+0x14a): undefined reference to `__Arena1Hi'
system.c:(.text.SYS_Init+0x14e): undefined reference to `__Arena1Hi'
system.c:(.text.SYS_Init+0x156): undefined reference to `__Arena2Lo'
system.c:(.text.SYS_Init+0x15a): undefined reference to `__Arena2Lo'
system.c:(.text.SYS_Init+0x162): undefined reference to `__Arena2Hi'
system.c:(.text.SYS_Init+0x166): undefined reference to `__Arena2Hi'
system.c:(.text.SYS_Init+0x16e): undefined reference to `__ipcbufferLo'
system.c:(.text.SYS_Init+0x176): undefined reference to `__ipcbufferLo'
system.c:(.text.SYS_Init+0x17a): undefined reference to `__ipcbufferHi'
system.c:(.text.SYS_Init+0x182): undefined reference to `__ipcbufferHi'
system.c:(.text.SYS_Init+0x532): undefined reference to `__Arena1Lo'
system.c:(.text.SYS_Init+0x536): undefined reference to `__Arena1Lo'
C:\devkitPro\libogc\lib\wii\libogc.a(system.o):(.sdata2.__sys_inIPL+0x0): undefined reference to `__isIPL'
C:\devkitPro\libogc\lib\wii\libogc.a(gx.o): In function `GX_EndDispList':
gx.c:(.text.GX_EndDispList+0x6a): undefined reference to `__gxregs'
gx.c:(.text.GX_EndDispList+0x7a): undefined reference to `__gxregs'
C:\devkitPro\libogc\lib\wii\libogc.a(gx.o): In function `GX_BeginDispList':
gx.c:(.text.GX_BeginDispList+0xda): undefined reference to `__gxregs'
gx.c:(.text.GX_BeginDispList+0xde): undefined reference to `__gxregs'
C:\devkitPro\libogc\lib\wii\libogc.a(gx.o): In function `GX_Init':
gx.c:(.text.GX_Init+0x76): undefined reference to `__gxregs'
C:\devkitPro\libogc\lib\wii\libogc.a(gx.o):gx.c:(.text.GX_Init+0x82): more undefined references to `__gxregs' follow
collect2: ld returned 1 exit status
So... What am I missing?

This is what I found, but to be honest, I've never seen anything like it.
http://wii-softchip.googlecode.com/svn/ ... der/rvl.ld

Thanks in advance.
-Josh

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Bluetooth.h?

Post by WinterMute » Mon May 18, 2009 2:15 am

None of the devkitPPC/libogc examples use bluetooth.h or BlueZ.

Please remove anything you installed inside the devkitPro folder or alternatively delete it & start again.

Once you've done that then double click the triangle.pnproj file in the triangle example folder - this should open the project in Programmer's Notepad, assuming you allowed the updater to install that. Once there click on Tools->Make or use the ALT+1 key combo, this will build the project and produce a triangle.dol in the project folder.

All wii/gamecube code is compiled using Makefiles - building manually is error prone and not supported.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Josh @ Dreamland
Posts: 5
Joined: Mon May 18, 2009 12:37 am

Re: Bluetooth.h?

Post by Josh @ Dreamland » Mon May 18, 2009 2:30 am

Fair enough. This'll... probably mean some recoding on my part for some plans of mine. But whatever it takes, I suppose.
Thanks for the help.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests