How to setup SGDK with geany

SGDK only sub forum

Moderator: Stef

Post Reply
lofihung
Interested
Posts: 11
Joined: Sat Nov 09, 2019 9:00 am

How to setup SGDK with geany

Post by lofihung » Thu Apr 02, 2020 4:24 pm

Hi!, a very basic question, i already have SGDK working with code::blocks but i want to set it up with Geany and im totally lost, how do i do it?

geany asks for a make command and a working directory.

Checked SGDK Installation process so i found i need to setup this as my make command.

%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen

and this is where i have SGDK installed, so i set it up as my working directory.

C:\SGDK\

for testing i made a simple hello world example

Code: Select all

#include <genesis.h>

int main()
{
	VDP_drawText("Genesis Does", 1, 1);

	while(1){
                VDP_waitVSync();
	}
	return (0);
};
it didnt compile so it displays this messages

Code: Select all

%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen (in directory: C:\SGDK\)
C:/SGDK/bin/mkdir -p src/boot
C:/SGDK/bin/mkdir -p out
C:/SGDK/bin/mkdir -p out/src
C:/SGDK/bin/mkdir -p out/res
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -c src/boot/rom_head.c -o out/rom_head.o
C:/SGDK/bin/ld -T C:/SGDK/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -c src/boot/sega.s -o out/sega.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c res/libres.s -o out/res/libres.o
C:/SGDK/bin/sjasm -isrc -iinc -ires -iC:/SGDK/src -iC:/SGDK/inc src/z80_drv1.s80 src/z80_drv1.o80 out.lst
SjASM Z80 Assembler v0.39g6 - www.xl2s.tk
Pass 1 complete (0 errors)
Pass 2 complete
Errors: 0
C:/SGDK/bin/bintos src/z80_drv1.o80
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/z80_drv1.s -o out/src/z80_drv1.o
C:/SGDK/bin/sjasm -isrc -iinc -ires -iC:/SGDK/src -iC:/SGDK/inc src/z80_drv2.s80 src/z80_drv2.o80 out.lst
SjASM Z80 Assembler v0.39g6 - www.xl2s.tk
Pass 1 complete (0 errors)
Pass 2 complete
Errors: 0
C:/SGDK/bin/bintos src/z80_drv2.o80
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/z80_drv2.s -o out/src/z80_drv2.o
C:/SGDK/bin/sjasm -isrc -iinc -ires -iC:/SGDK/src -iC:/SGDK/inc src/z80_drv3.s80 src/z80_drv3.o80 out.lst
SjASM Z80 Assembler v0.39g6 - www.xl2s.tk
Pass 1 complete (0 errors)
Pass 2 complete
Errors: 0
C:/SGDK/bin/bintos src/z80_drv3.o80
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/z80_drv3.s -o out/src/z80_drv3.o
C:/SGDK/bin/sjasm -isrc -iinc -ires -iC:/SGDK/src -iC:/SGDK/inc src/z80_xgm.s80 src/z80_xgm.o80 out.lst
SjASM Z80 Assembler v0.39g6 - www.xl2s.tk
Pass 1 complete (0 errors)
Pass 2 complete
Errors: 0
C:/SGDK/bin/bintos src/z80_xgm.o80
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/z80_xgm.s -o out/src/z80_xgm.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/bmp_a.s -o out/src/bmp_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/kdebug.s -o out/src/kdebug.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/maths3D_a.s -o out/src/maths3D_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/memory_a.s -o out/src/memory_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/smp_null.s -o out/src/smp_null.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/smp_null_pcm.s -o out/src/smp_null_pcm.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/sram_a.s -o out/src/sram_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/sys_a.s -o out/src/sys_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tools_a.s -o out/src/tools_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp_tile_a.s -o out/src/vdp_tile_a.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/bmp.c -o out/src/bmp.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/dma.c -o out/src/dma.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/everdrive.c -o out/src/everdrive.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/fat16.c -o out/src/fat16.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/joy.c -o out/src/joy.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/maths.c -o out/src/maths.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/maths3D.c -o out/src/maths3D.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/memory.c -o out/src/memory.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/pal.c -o out/src/pal.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/psg.c -o out/src/psg.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/sound.c -o out/src/sound.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/sprite_eng.c -o out/src/sprite_eng.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/sram.c -o out/src/sram.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/string.c -o out/src/string.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/sys.c -o out/src/sys.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tab_cnv.c -o out/src/tab_cnv.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tab_log10.c -o out/src/tab_log10.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tab_log2.c -o out/src/tab_log2.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tab_sin.c -o out/src/tab_sin.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tab_sqrt.c -o out/src/tab_sqrt.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tab_vol.c -o out/src/tab_vol.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/timer.c -o out/src/timer.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/tools.c -o out/src/tools.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/types.c -o out/src/types.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp.c -o out/src/vdp.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp_bg.c -o out/src/vdp_bg.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp_dma.c -o out/src/vdp_dma.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp_pal.c -o out/src/vdp_pal.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp_spr.c -o out/src/vdp_spr.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vdp_tile.c -o out/src/vdp_tile.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/vram.c -o out/src/vram.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/xgm.c -o out/src/xgm.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/ym2612.c -o out/src/ym2612.o
C:/SGDK/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c src/z80_ctrl.c -o out/src/z80_ctrl.o
echo "out/res/libres.o out/res/libres.o out/src/z80_drv1.o out/src/z80_drv2.o out/src/z80_drv3.o out/src/z80_xgm.o out/src/bmp_a.o out/src/kdebug.o out/src/maths3D_a.o out/src/memory_a.o out/src/smp_null.o out/src/smp_null_pcm.o out/src/sram_a.o out/src/sys_a.o out/src/tools_a.o out/src/vdp_tile_a.o out/src/bmp.o out/src/dma.o out/src/everdrive.o out/src/fat16.o out/src/joy.o out/src/maths.o out/src/maths3D.o out/src/memory.o out/src/pal.o out/src/psg.o out/src/sound.o out/src/sprite_eng.o out/src/sram.o out/src/string.o out/src/sys.o out/src/tab_cnv.o out/src/tab_log10.o out/src/tab_log2.o out/src/tab_sin.o out/src/tab_sqrt.o out/src/tab_vol.o out/src/timer.o out/src/tools.o out/src/types.o out/src/vdp.o out/src/vdp_bg.o out/src/vdp_dma.o out/src/vdp_pal.o out/src/vdp_spr.o out/src/vdp_tile.o out/src/vram.o out/src/xgm.o out/src/ym2612.o out/src/z80_ctrl.o" > out/cmd_
C:/SGDK/bin/gcc -BC:/SGDK/bin -n -T C:/SGDK/md.ld -nostdlib out/sega.o @out/cmd_ C:/SGDK/lib/libmd.a C:/SGDK/lib/libgcc.a -o out/rom.out
out/res/libres.o: In function `stop_xgm':
(.rodata+0x0): multiple definition of `stop_xgm'
out/res/libres.o:(.rodata+0x0): first defined here
out/res/libres.o: In function `font_pal_default':
(.rodata+0x76a): multiple definition of `font_pal_default'
out/res/libres.o:(.rodata+0x76a): first defined here
out/res/libres.o: In function `font_default':
(.rodata+0x770): multiple definition of `font_default'
out/res/libres.o:(.rodata+0x770): first defined here
out/res/libres.o: In function `sgdk_logo':
(.rodata+0x778): multiple definition of `sgdk_logo'
out/res/libres.o:(.rodata+0x778): first defined here
C:\Users\xxx\AppData\Local\Temp\ccWStXlX.ltrans3.ltrans.o: In function `_reset_entry':
<artificial>:(.text+0x768): undefined reference to `main'
C:\Users\xxx\AppData\Local\Temp\ccWStXlX.ltrans3.ltrans.o: In function `_start_entry':
<artificial>:(.text+0x818): undefined reference to `main'
make": *** [out/rom.out] Error 1
rm src/z80_xgm.s src/z80_drv1.s src/z80_drv3.o80 src/z80_xgm.o80 src/z80_drv2.o80 src/z80_drv2.s src/z80_drv3.s src/z80_drv1.o80
Compilation failed.
Last edited by lofihung on Sat Apr 04, 2020 2:51 pm, edited 1 time in total.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: How to setup SGDK with geany

Post by Chilly Willy » Fri Apr 03, 2020 7:37 pm

The way it works for me in Windows 7...

Set three environment variables in Windows:

Code: Select all

GDK set to "C:/tools/SGDK"
GDK_WIN set to "C:\tools\SGDK"
Path has added to end ";%GDK_WIN%\bin"
and then restart so the env vars are active.

Inside Geany, pull up the main C file for the project (main.c often) and set the build commands:

Code: Select all

Make set to "make -f %GDK_WIN%\makefile.gen"
Then select Make All from the command bar.

Whatever file is currently selected for editing in Geany sets the working directory. You can override that in the set build command dialog, but I never do it that way.

lofihung
Interested
Posts: 11
Joined: Sat Nov 09, 2019 9:00 am

Re: How to setup SGDK with geany

Post by lofihung » Sat Apr 04, 2020 10:59 am

thanks Chilly you guided me in the right direction, at the end it was solved by just leaving empty the working directory.

for the record, if anyone wants to try this is the setup process i got working in windows 10.

set windows enviroment variables

Code: Select all

GDK to "C:/SGDK/"
GDK_WIN to "C:\SGDK\"
then in geany; menu build -> set build commands -> make

Code: Select all

%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: How to setup SGDK with geany

Post by Chilly Willy » Sat Apr 04, 2020 4:46 pm

Yeah, that would avoid changing the path env var, which might be a requirement if you were using another cross-compiler for something. I might do that myself.

lofihung
Interested
Posts: 11
Joined: Sat Nov 09, 2019 9:00 am

Re: How to setup SGDK with geany

Post by lofihung » Tue May 12, 2020 3:13 pm

i was messing with the proyect and sgdk couldnt update changes in sprites;

this command was a life saver.

Code: Select all

%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen cleandefault
add it to the make custom command list.

Post Reply