Page 1 of 1
can't get SGDK to work with C::B (Nothing to be done ?)
Posted: Sun Dec 22, 2013 12:10 am
by tryphon
Hello,
I've tried to install SGDK 0.94 with Code::Blocks. I followed the article on the wiki, and, when asked to add file in my project, I added those from the cube_flat directory in the SGDK sample dir.
When I try to build the ROM, I get the message :
-------------- Clean: default in test1 (compiler: Megadrive GCC Compiler)---------------
c:/sgdk094/bin/rm -f out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin
Cleaned "test1 - default"
-------------- Build: default in test1 (compiler: Megadrive GCC Compiler)---------------
Target is up to date.
Nothing to be done (all items are up-to-date).
And no rom.bin file anywhere...
I precise that, if I have some basis in C language, I've little skills in configuring IDEs (worse : I actually hate and fear that

) so my mistake is likely completely stupid.
Posted: Sun Dec 22, 2013 12:16 am
by djcouchycouch
While you wait for Stef to help, can you verify if SGDK works on the command line?
Posted: Sun Dec 22, 2013 12:44 am
by tryphon
I follow the guide at
https://code.google.com/p/sgdk/wiki/HowToUseSGDK
Doesn't seem to work at the first step :
Code: Select all
Microsoft Windows [version 6.3.9600]
(c) 2013 Microsoft Corporation. Tous droits r‚serv‚s.
C:\Users\Tryphon>%GDK_WIN%\bin\make -f %GDK_WIN%\makelib.gen
c:/sgdk094/bin/bintos -bmp c:/sgdk094/res/logo_lib.bmp
c:/sgdk094/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -
fno-builtin-memcpy -Ic:/sgdk094/include -Ic:/sgdk094/src -Ic:/sgdk094/res -c c:/
sgdk094/res/logo_lib.s -o c:/sgdk094/res/logo_lib.o
c:/sgdk094/bin/sjasm -ic:/sgdk094/src -ic:/sgdk094/include c:/sgdk094/src/z80_dr
v1.s80 c:/sgdk094/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:/sgdk094/bin/bintos c:/sgdk094/src/z80_drv1.o80
c:/sgdk094/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -
fno-builtin-memcpy -Ic:/sgdk094/include -Ic:/sgdk094/src -Ic:/sgdk094/res -c c:/
sgdk094/src/z80_drv1.s -o c:/sgdk094/src/z80_drv1.o
c:/sgdk094/bin/sjasm -ic:/sgdk094/src -ic:/sgdk094/include c:/sgdk094/src/z80_dr
v2.s80 c:/sgdk094/src/z80_drv2.o80 out.lst
46 [main] ? (2372) c:\sgdk094\bin\make.exe: *** fatal error - c:\sgdk094\bi
n\make.exe: *** couldn't allocate heap, Win32 error 0, base 0x820000, top 0x8400
00, reserve_size 126976, allocsize 131072, page_const 4096
79 [main] make 4728 fork: child -1 - died waiting for longjmp before initia
lization, retry 0, exit code 0x100, errno 11
make: vfork: Resource temporarily unavailable
rm c:/sgdk094/src/z80_drv1.s c:/sgdk094/res/logo_lib.s c:/sgdk094/src/z80_drv1.o
80
C:\Users\Tryphon>
Unless I'm mistaken, this step (makelib.gen) wasn't needed (or at least, precised) in C::B configuration.[/quote]
Posted: Sun Dec 22, 2013 1:20 am
by djcouchycouch
makelib is for rebuilding the SGDK libraries. makefile is for building your project.
Have you properly set your GDK and GDK_WIN environment variables?
Here are mine:
Code: Select all
@SET GDK=c:/dropbox/segagenesisdevelopment/sgdk
@SET GDK_WIN=C:\Dropbox\SegaGenesisDevelopment\sgdk
Notice that the slashes are different.
Maybe you've got a conflicting make in your path?
Posted: Sun Dec 22, 2013 3:02 am
by tryphon
Yes, I have notices about the slashes.
A conflicting make is not impossible. Though, in the command line version, the %GDK_WIN% is specified, so it should be the good make that is called.
How can I know ?
Posted: Sun Dec 22, 2013 6:41 pm
by Stef
Did you modified the makefile command according to this image ?
Also for the command line error, look like you tried to compile the library instead of your project (but anyway that should work). Still sometime GCC crashes and you have to launch severals time the command to get it to command entirely your project !
Posted: Mon Dec 23, 2013 1:18 am
by tryphon
I had made mistakes when modifying the makefile commands (I made those modifications for the 'test' item, not the 'default'). I fixed that but it still doesn"t work. When rebuilding, I still get the same message.
You were right as to compile the library : it seems to have worked when running it the third time... I'll try to complete the wiki page about command line.
[/img]
Posted: Mon Dec 23, 2013 10:52 am
by Stef
Correcting the makefile command should have done it, can you post your build log details when you try to launch 'rebuild' command ? Also are you sure the out/rom.bin file is missing ? By default i think i provide them.
Posted: Tue Dec 24, 2013 5:16 pm
by tryphon
Thanks for your support.
The build log message is exactly what I gave in the first message :
-------------- Clean: default in test1 (compiler: Megadrive GCC Compiler)---------------
c:/sgdk094/bin/rm -f out/main.o out/meshs.o out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin
Cleaned "test1 - default"
-------------- Build: default in test1 (compiler: Megadrive GCC Compiler)---------------
Target is up to date.
Nothing to be done (all items are up-to-date).
As to the bin file, I actially copied only the 2 .c files and the .h (not the out directory, nor the .bin) in the test1/ directory.
Interesting fact : I managed to build the bin using command line.
Posted: Wed Dec 25, 2013 11:26 am
by Stef
From your log it looks like there is still an issue with the makefile stuff :
http://images4.hiboox.com/images/3312/c ... 7f408c.jpg
We can see the make command is looking for the "default" target but it should not if you correctly removed the "$target" keyword from your makefile commands ! Check both in test / default profile if you don't have any $target specified somewhere.
Posted: Sun Dec 29, 2013 4:18 pm
by S. P. Gardebiter
If it still doesn't work try to reinstall Code::Blocks and make sure it's deinstalled completly before installing it again (deleting appdata and so on).
I've had the same problem before and after doing so everything worked.
Posted: Sun Dec 29, 2013 9:01 pm
by tryphon
I confirm the two profiles are correct. I'll try to reinstall C::B.