Page 1 of 1
issues after reading "How to use SGDK from command line
Posted: Wed Nov 23, 2011 11:56 am
by zhengyaxin_8bit
1. my computer's environment variable setting like this:
GDK_WIN=D:\apps\gendev
bin=D:\apps\gendev\bin[/b][/b]
2. When i run the make file command, then the result is
D:\apps\gendev\bin>make -f D:\apps\gendev\makelib.gen
D:\apps\gendev/bin/sjasm -iD:\apps\gendev/src -iD:\apps\gendev/include D:\apps\g
endev/src/z80_drv1.s80 D:\apps\gendev/src/z80_drv1.o80 out.lst
zsh: no such file or directory: D:appsgendev\bin\sjasm
make: *** [D:\apps\gendev/src/z80_drv1.o80] Error 1
...............................................................................
Could you let me know what's wrong with all my setting?
3. can I compile the sound.cbp on command line?
4. could you tell me what's the differnces between .tfd and .tfe ,,,or how to transfer from .tfe to .tfd ?
5. where can i find the files defined in sound.h?
[/img]
Posted: Wed Nov 23, 2011 1:51 pm
by Pascal
in computer's environment, you should have only 1 variable:
GDK=D:\apps\gendev
and modify the PATH variable to append the bin path: D:\apps\gendev\bin
be sure you have this in the makefile
BIN= $(GDK)/bin
LIB= $(GDK)/lib
that'd do the trick
Posted: Wed Nov 23, 2011 2:20 pm
by zhengyaxin_8bit
in my computer's system environment ,the PATH variable is
path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\tool;D:\apps\gendev\bin
and the makelib.gen like this
BIN= $(GDK)/bin
LIB= $(GDK)/lib
SRC= $(GDK)/src
RES= $(GDK)/res
INCLUDE= $(GDK)/include
SHELL=$(BIN)/sh
AR= $(BIN)/ar
CC= $(BIN)/gcc
LD= $(BIN)/ld
OBJCPY= $(BIN)/objcopy
ASMZ80= $(BIN)/sjasm
MACCER= $(BIN)/mac68k
......
Posted: Wed Nov 23, 2011 2:27 pm
by zhengyaxin_8bit
I make one file "zyx.bat"
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
pause
after run zyx.bat will creat error
----------------------------------------------------------
D:\apps\gendev>D:\apps\gendev\bin\make -f D:\apps\gendev\makelib.gen
D:\apps\gendev/bin/sjasm -iD:\apps\gendev/src -iD:\apps\gendev/include D:\apps\g
endev/src/z80_drv1.s80 D:\apps\gendev/src/z80_drv1.o80 out.lst
zsh: no such file or directory: D:appsgendev\bin\sjasm
make: *** [D:\apps\gendev/src/z80_drv1.o80] Error 1
D:\apps\gendev>PAUSE
---------------------------------------------------------
Press any key to continue . . .
Posted: Wed Nov 23, 2011 2:53 pm
by Pascal
zhengyaxin_8bit wrote:I make one file "zyx.bat"
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
pause
after run zyx.bat will creat error
----------------------------------------------------------
D:\apps\gendev>D:\apps\gendev\bin\make -f D:\apps\gendev\makelib.gen
D:\apps\gendev/bin/sjasm -iD:\apps\gendev/src -iD:\apps\gendev/include D:\apps\g
endev/src/z80_drv1.s80 D:\apps\gendev/src/z80_drv1.o80 out.lst
zsh: no such file or directory: D:appsgendev\bin\sjasm
make: *** [D:\apps\gendev/src/z80_drv1.o80] Error 1
D:\apps\gendev>PAUSE
---------------------------------------------------------
Press any key to continue . . .
try this batch:
SET GDK="D:\apps\gendev"
cd %GDK%
make -f makelib.gen
Posted: Wed Nov 23, 2011 5:16 pm
by zhengyaxin_8bit
I have found the question, I must setting GDK=D:/apps/gendev;but I use window xp. Thanks Pascal

Posted: Wed Nov 23, 2011 5:50 pm
by zhengyaxin_8bit
--------------------------------------------------
Now you can compile the library by using
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
When the library is compiled you should obtain the following files
%GDK%/lib/sega.o
%GDK%/lib/libgendev.a
--------------------------------------------------
after compiled the library,I don't find sega.o ,and libgendev.a
is exist before compile the library.
I try to put sega.s and rom_head.c into "D:\apps\gendev\src\" and run compile library agian ,will creat error as here:
---------------------------------------------------
D:\apps\gendev>make -f makelib.gen
D:/apps/gendev/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-mems
et -fno-builtin-memcpy -ID:/apps/gendev/include -c D:/apps/gendev/src/sega.s -o
D:/apps/gendev/src/sega.o
D:/apps/gendev/src/sega.s: Assembler messages:
D:/apps/gendev/src/sega.s:43: Error: file not found: out/rom_head.bin
make: *** [D:/apps/gendev/src/sega.o] Error 1
D:\apps\gendev>PAUSE
Press any key to continue . . .
Posted: Fri Nov 25, 2011 9:43 am
by Stef
zhengyaxin_8bit wrote:--------------------------------------------------
Now you can compile the library by using
%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
When the library is compiled you should obtain the following files
%GDK%/lib/sega.o
%GDK%/lib/libgendev.a
--------------------------------------------------
after compiled the library,I don't find sega.o ,and libgendev.a
is exist before compile the library.
I try to put sega.s and rom_head.c into "D:\apps\gendev\src" and run compile library agian ,will creat error as here:
---------------------------------------------------
D:\apps\gendev>make -f makelib.gen
D:/apps/gendev/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-mems
et -fno-builtin-memcpy -ID:/apps/gendev/include -c D:/apps/gendev/src/sega.s -o
D:/apps/gendev/src/sega.o
D:/apps/gendev/src/sega.s: Assembler messages:
D:/apps/gendev/src/sega.s:43: Error: file not found: out/rom_head.bin
make: *** [D:/apps/gendev/src/sega.o] Error 1
D:\apps\gendev>PAUSE
Press any key to continue . . .
From the problem you're experiencing it seems i need to update my tutorial from command line. I'll check that and get back here to explain what was the problem.
Posted: Sun Nov 27, 2011 5:56 pm
by Stef
Just figured your problem, actually you need to set both variables GDK and GDK_WIN. Here's what is written on tutorial :
Define "GDK" environment variable to your installation path in unix path format (example D:/sgdk).
Define "GDK_WIN" which still point to your installation path but in windows format (exemple D:\sgdk).
And both lines concern windows OS as anyway SGDK works only for windows.
If you need the GDK variable set in unix path like it's because internals GCC tools handle path this way.