Page 1 of 2

genesis.h include path?

Posted: Thu Feb 27, 2014 9:16 pm
by Kuroto
Hi,

I was reinstalling my Genny development environment, first using the latest version of Code::Blocks. After trying for several hours i couldn't get it to do anything but saying "All files are up to date" and not actually building.

Then i tried installing eclipse. Now the console says "no include path in which to search for genesis.h".

Any ideas what went wrong?

Thanks in advance!

-Steve

Edit: I should mention that i used the tutorial at http://gendev.spritesmind.net/page-eclipse.html#part1

So the makefile has been changed as well.

Posted: Thu Feb 27, 2014 10:19 pm
by Stef
At least i recommend you to use this tutorial for Eclipse + SGDK :
http://code.google.com/p/sgdk/wiki/UseSGDKWithEclipse

As the one you used is very outdated !
Myself i do not use Eclipse (yet) so i am not sure about the problem you are experiencing :-/

Posted: Thu Feb 27, 2014 11:46 pm
by matteus
Seriously recommend the code blocks route!

Follow the instructions in the Code Blocks Tutorial, if you find your project still doesn't work then download one of the demo projects.

Open up you project's cbp file in Notepad++ and then open the demo projects cbp file up.

Do a comparison between the two cbp files and make sure the configuration matches in both.

This should *fingers crossed* fix your issue :)

Posted: Fri Feb 28, 2014 11:53 am
by Kuroto
I would actually prefer Code::Blocks, as i despise pretty much every application that's using a Java VM (Eclipse). They just feel bloated to me.

I did try your suggestion, Matteus, and now i get the same problem in Code::Blocks as i get in Eclipse.
This leads me to believe there might be something wrong with the configuration of my paths.

This is what i get in Code::Blocks, using the Hello World example.

Image


I've double checked the GDK and GDK_WIN environment variables, and as far as i can see, they should be correct:

Image


I'm pretty sure it's something silly that i'm missing, but i can't find the issue at the moment.

Thanks for the help already :)

-Steve

Posted: Fri Feb 28, 2014 12:47 pm
by Stef
Be sure to specify a specific makefile for your project :

Image

Posted: Fri Feb 28, 2014 7:13 pm
by Chilly Willy
It's probably more an issue with the environment variables rather than the makefile. Make sure CB has the envvars set correctly or the makefile won't find anything.

Posted: Mon Mar 03, 2014 1:10 am
by Kuroto
Stef: Those settings are exactly the same as i have them. :?

Chilly Willy: Hm. I did check the vars in CB as well (read it somewhere). I'll check when i get back to Dublin (on holiday in Belgium for a few days to visit my family).

I'll keep you posted!

Posted: Mon Mar 03, 2014 9:02 am
by Stef
If all those settings are correct i have to admit that i don't understand what happen. The include path are defined in the makefile and as your environment variables look correct the genesis.h file should definitely be found.

Can you put the build log output (it actually display the full executed command line) ?

Posted: Mon Mar 03, 2014 9:33 am
by matteus
Kuroto have you tried following procedure first to make sure it builds correctly?

https://code.google.com/p/sgdk/wiki/HowToUseSGDK

Posted: Wed Mar 05, 2014 9:39 pm
by Kuroto
Hi,

Stef: This is the build log:

Code: Select all

-------------- Build: default in test (compiler: Sega Genesis/Megadrive compiler)---------------

Running command: make.exe -f D:\apps\gendev\makefile.gen
D:/apps/gendev/bin/gcc  -m68000 -Wall -O1 -fomit-frame-pointer -ID:/apps/gendev/include -c main.c -o main.o
main.c:1:21: no include path in which to search for genesis.h
main.c: In function `main':
main.c:5: warning: implicit declaration of function `VDP_drawText'
main.c:15: warning: implicit declaration of function `VDP_waitVSync'
make: *** [main.o] Error 1
Process terminated with status 2 (0 minute(s), 0 second(s))
1 error(s), 2 warning(s) (0 minute(s), 0 second(s))
 
Matteus: I've followed that tutorial as well.

Posted: Wed Mar 05, 2014 10:13 pm
by Stef
Ok, from this line :
D:/apps/gendev/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -ID:/apps/gendev/include
I can say you are using a outdated version of the makefile. If you upgraded to the last SGDK version you will notice that include folder changed to "inc" instead of "include". Normally the makefile has been modified for that but for some reasons it looks like you still have the old makefiles in your SGDK folder.

Posted: Thu Mar 06, 2014 12:09 am
by Kuroto
Hi Stef,

Thanks for the info!

I've overwritten my full SGDK folder with the latest version.
This is what i get now:

Code: Select all

-------------- Build: default in test (compiler: Sega Genesis/Megadrive compiler)---------------

Running command: make.exe -f D:\apps\gendev\makefile.gen
D:/apps/gendev/bin/mkdir -p out
D:/apps/gendev/bin/mkdir -p out/src
D:/apps/gendev/bin/mkdir -p out/res
D:/apps/gendev/bin/gcc  -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -Iinc -Isrc -Ires -ID:/apps/gendev/inc -ID:/apps/gendev/res -BD:/apps/gendev/bin -c main.c -o out/main.o
In file included from D:/apps/gendev/inc/genesis.h:14,
                 from main.c:1:
D:/apps/gendev/inc/font.h:19:20: libres.h: No such file or directory
make: *** [out/main.o] Error 1
Process terminated with status 2 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Posted: Thu Mar 06, 2014 10:32 am
by Stef
Hi,

It looks like i forgot to include the libres.h file :-/
Actually the file is auto generated when you compile the library so you can try to recompile the library before compiling your project.
For that you just need to use make but with a different makefile :
make.exe -f D:\apps\gendev\makelib.gen

Posted: Thu Mar 06, 2014 8:28 pm
by Kuroto
Hi Stef,

No worries about it, it can happen.
I recompiled the library as you told me, and now it's smooth sailing! :D

Thanks for the help!

Code: Select all

Running command: make.exe -f D:\apps\gendev\makefile.gen
D:/apps/gendev/bin/mkdir -p out
D:/apps/gendev/bin/mkdir -p out/src
D:/apps/gendev/bin/mkdir -p out/res
D:/apps/gendev/bin/gcc  -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -fno-builtin-memcpy -Iinc -Isrc -Ires -ID:/apps/gendev/inc -ID:/apps/gendev/res -BD:/apps/gendev/bin -c main.c -o out/main.o
echo "out/main.o" > out/cmd_
D:/apps/gendev/bin/gcc -BD:/apps/gendev/bin -n -T D:/apps/gendev/md.ld -nostdlib out/sega.o @out/cmd_ D:/apps/gendev/lib/libmd.a D:/apps/gendev/lib/libgcc.a -o out/rom.out
D:/apps/gendev/bin/rm out/cmd_
D:/apps/gendev/bin/objcopy -O binary out/rom.out out/rom.bin
D:/apps/gendev/bin/sizebnd out/rom.bin -sizealign 131072
Process terminated with status 0 (0 minute(s), 2 second(s))
0 error(s), 0 warning(s) (0 minute(s), 2 second(s))

Posted: Thu Mar 06, 2014 8:51 pm
by Stef
Glad you finally got it working =)
And thanks that permitted to repair the missing libres.h file in the archive ;)