build error when trying Set_Palette

SGDK only sub forum

Moderator: Stef

Post Reply
alko
Very interested
Posts: 155
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

build error when trying Set_Palette

Post by alko » Mon Mar 23, 2020 6:52 pm

please, help!

SGDK 1.41

My program compiles successfully, but when I add to the code VDP_setPalette(PAL0, floor1.palette->data) an error occurs at the build process

Build log:

Code: Select all

            ^
C:\Users\ALKO\AppData\Local\Temp\cciQpyUe.ltrans4.ltrans.o: In function `VDP_setPalette':
<artificial>:(.text+0x896): multiple definition of `VDP_setPalette'
E:/sgdk112/lib/libmd.a(vdp_pal_a.o):(.text+0x114): first defined here
C:\Users\ALKO\AppData\Local\Temp\cciQpyUe.ltrans4.ltrans.o: In function `VDP_setPaletteColors':
<artificial>:(.text+0x8ea): multiple definition of `VDP_setPaletteColors'
E:/sgdk112/lib/libmd.a(vdp_pal_a.o):(.text+0x66): first defined here
C:\Users\ALKO\AppData\Local\Temp\cciQpyUe.ltrans4.ltrans.o: In function `VDP_getPalette':
<artificial>:(.text+0xa14): multiple definition of `VDP_getPalette'
E:/sgdk112/lib/libmd.a(vdp_pal_a.o):(.text+0xcc): first defined here
C:\Users\ALKO\AppData\Local\Temp\cciQpyUe.ltrans4.ltrans.o: In function `VDP_getPaletteColors':
<artificial>:(.text+0xa7e): multiple definition of `VDP_getPaletteColors'
E:/sgdk112/lib/libmd.a(vdp_pal_a.o):(.text+0x0): first defined here
make.exe: *** [out/rom.out] Error 1
rm res/sprite.s res/music.s res/gfx.s
Process terminated with status 2 (0 minute(s), 2 second(s))
8 error(s), 7 warning(s) (0 minute(s), 2 second(s))
Image

Stef
Very interested
Posts: 3034
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: build error when trying Set_Palette

Post by Stef » Mon Mar 23, 2020 7:40 pm

Look like you updated SGDK by copying new files directly into the SGDK folder.
The problem is that some removed files (as vdp_pal_a.s file) weren't removed from your src folder ;)
Just remove vdp_pal_a.s file from src SGDK folder and recompile the library, it should be fine :)

alko
Very interested
Posts: 155
Joined: Thu Aug 07, 2014 9:31 am
Location: Russian Federation

Re: build error when trying Set_Palette

Post by alko » Mon Mar 23, 2020 8:39 pm

thanks!
Image

Post Reply