gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > VBA / Insight trouble ...again

#12861 - yaustar - Sat Nov 29, 2003 12:34 am

OK, me and my friend have got this thing to work up to this stage:

game is running in VBA using tcp
code appears in C in the insight window

but the two seem not to match, we are really not sure what should happen at this point. Can anyone help us?
_________________
[Blog] [Portfolio]

#12884 - vL - Sat Nov 29, 2003 4:29 pm

Probably you compiled with optimizations on (like -O2 or -O3). This confuses gdb (insight).

Try with -O0 (that is "- Oh Zero").

#12887 - yaustar - Sat Nov 29, 2003 5:32 pm

Code:

path=c:\DevkitAdv\old\bin
g++ -g -o main.elf main.cpp bg.cpp -lm
objcopy -O binary main.elf main.gba

pause


it didn't like O0, it just popped up with errors that I really do not have a clue about....
_________________
[Blog] [Portfolio]

#12904 - vL - Sun Nov 30, 2003 11:50 am

yaustar wrote:
it didn't like O0, it just popped up with errors that I really do not have a clue about....

So try without any -O? at all.
And post the log, so we can help you

#12911 - yaustar - Sun Nov 30, 2003 4:00 pm

here is the output
Code:


C:\Documents and Settings\yaustar_8p\My Documents\My Project\Code\BG_DMA014>path
=c:\DevkitAdv\old\bin

C:\Documents and Settings\yaustar_8p\My Documents\My Project\Code\BG_DMA014>g++
-g -O0 main.elf main.cpp bg.cpp -lm
main.elf: In function `__boot_method':
main.elf(.text+0xc4): multiple definition of `__boot_method'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/../../../../arm-a
gb-elf/lib/crt0.o(.text+0xc4): first defined here
main.elf: In function `__FarFunction':
main.elf(.text+0x17a): multiple definition of `__FarProcedure'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/../../../../arm-a
gb-elf/lib/crt0.o(.text+0x17a): first defined here
main.elf: In function `__slave_number':
main.elf(.text+0xc5): multiple definition of `__slave_number'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/../../../../arm-a
gb-elf/lib/crt0.o(.text+0xc5): first defined here
main.elf(.ctors+0x0): multiple definition of `__CTOR_LIST__'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/crtbegin.o(.ctors
+0x0): first defined here
main.elf: In function `_start':
main.elf(.text+0x0): multiple definition of `_start'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/../../../../arm-a
gb-elf/lib/crt0.o(.text+0x0): first defined here
main.elf: In function `start_vector':
main.elf(.text+0xe0): multiple definition of `start_vector'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/../../../../arm-a
gb-elf/lib/crt0.o(.text+0xe0): first defined here
main.elf(.dtors+0x0): multiple definition of `__DTOR_LIST__'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/crtbegin.o(.dtors
+0x0): first defined here
main.elf(.eh_frame+0x0): multiple definition of `__EH_FRAME_BEGIN__'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/crtbegin.o(.eh_fr
ame+0x0): first defined here
main.elf: In function `__FarFunction':
main.elf(.text+0x17a): multiple definition of `__FarFunction'
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/../../../../arm-a
gb-elf/lib/crt0.o(.text+0x17a): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `main':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:84: multiple definition of `KEYS'
main.elf(.data+0x4): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `main':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:84: multiple definition of `OAM'
main.elf(.data+0x8): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `main':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:84: multiple definition of `var_snakeHeight'
main.elf(.data+0xc): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `main':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:84: multiple definition of `main'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:84: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_initia
lizeSprites()':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:325: multiple definition of `func_initializeSprites()'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:325: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_getInp
ut(short&, short&)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:863: multiple definition of `func_getInput(short&, short&)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:863: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_guardM
ove()':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:706: multiple definition of `func_guardMove()'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:706: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_checkO
verlay(short, short, short)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:680: multiple definition of `func_checkOverlay(short, short, short
)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:680: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_moveSp
rite(tagOAMEntry*, int, int)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:1020: multiple definition of `func_moveSprite(tagOAMEntry*, int, i
nt)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:1020: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_drawRa
dar(short, short, unsigned char)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:352: multiple definition of `func_drawRadar(short, short, unsigned
 char)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:352: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_cColli
sionSnake(short&, short&, unsigned char)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:471: multiple definition of `str_snakeSprite'
main.elf(.bss+0x1404): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_cColli
sionSnake(short&, short&, unsigned char)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:471: multiple definition of `str_guardSprite'
main.elf(.bss+0x1410): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `main':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:84: multiple definition of `sprites'
main.elf(.bss+0x4): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `main':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:234: multiple definition of `radar'
main.elf(.bss+0x404): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_moveEn
vir(short&, short&, short, short)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:336: multiple definition of `func_moveEnvir(short&, short&, short,
 short)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:336: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_cColli
sionSnake(short&, short&, unsigned char)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:422: multiple definition of `func_cCollisionSnake(short&, short&,
unsigned char)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:422: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/cc7eoFaT.o: In function `func_cColli
sionGuard(short, short, short&, short&, unsigned char)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/main.cpp:551: multiple definition of `func_cCollisionGuard(short, short, sh
ort&, short&, unsigned char)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/main.cpp:551: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/ccF6Xog5.o: In function `EnableBackg
round(Bg*)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/bg.cpp:12: multiple definition of `SIN'
main.elf(.data+0x10): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/ccF6Xog5.o(.data+0x5a0): multiple de
finition of `COS'
main.elf(.data+0x5b0): first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/ccF6Xog5.o: In function `EnableBackg
round(Bg*)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/bg.cpp:12: multiple definition of `EnableBackground(Bg*)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/bg.cpp:12: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/ccF6Xog5.o: In function `UpdateBackg
round(Bg*)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/bg.cpp:51: multiple definition of `UpdateBackground(Bg*)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/bg.cpp:51: first defined here
/cygdrive/c/DOCUME~1/YAUSTA~1/LOCALS~1/Temp/ccF6Xog5.o: In function `RotateBackg
round(Bg*, int, int, int, long)':
/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/Code/BG_DM
A014/bg.cpp:101: multiple definition of `RotateBackground(Bg*, int, int, int, lo
ng)'
main.elf:/cygdrive/c/Documents and Settings/yaustar_8p/My Documents/My Project/C
ode/BG_DMA014/bg.cpp:101: first defined here
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/crtend.o(.ctors+0
x0): multiple definition of `__CTOR_END__'
main.elf(.ctors+0x4): first defined here
/cygdrive/c/DevkitAdv/old/bin/../lib/gcc-lib/arm-agb-elf/3.0.2/crtend.o(.dtors+0
x0): multiple definition of `__DTOR_END__'
main.elf(.dtors+0x4): first defined here
collect2: ld returned 1 exit status

C:\Documents and Settings\yaustar_8p\My Documents\My Project\Code\BG_DMA014>objc
opy -O binary main.elf main.gba

C:\Documents and Settings\yaustar_8p\My Documents\My Project\Code\BG_DMA014>paus
e
Press any key to continue . . .

works fine with the -o though :/
_________________
[Blog] [Portfolio]

#12915 - evil saltine - Sun Nov 30, 2003 4:32 pm

You need to leave the -o in, uppercase O is different from lowercase.

#12916 - yaustar - Sun Nov 30, 2003 4:43 pm

Code:

path=c:\DevkitAdv\old\bin
g++ -g -O -o main.elf main.cpp bg.cpp -lm
objcopy -O binary main.elf main.gba

pause


it works fine compile wise :/

I try it with insight a bit later
_________________
[Blog] [Portfolio]

#12917 - evil saltine - Sun Nov 30, 2003 4:54 pm

okay, I think you need to change -O to -O0 though (for g++).

#12925 - yaustar - Mon Dec 01, 2003 2:17 am

still get the same problem, the game runs off with the rom whilst the code is just sitting there with one having no bearing on the other. I know this is going to be a lot to ask but can some one please give/point to an idiot's guide on how to use this piece of software?
_________________
[Blog] [Portfolio]