Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

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

Post by Stef »

If you use unmodified makefile from SGDK 0.9 and follow step by step the following tutorial you should get things working.
Mixail
Very interested
Posts: 133
Joined: Thu Nov 18, 2010 4:47 pm

Post by Mixail »

My build file:

Code: Select all

path = ..\..\bin;
make -f makefile clean
make -f makefile
pause
What is wrong? How it is correct?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Did you actually read the tutorial i pointed ?

The PATH variable is an environment variable and you shouldn't modify it this way. I guess you're using windows XP or windows 7 OS so you should look here to understand how set / modify environment variables.

Then your batch should contains :

Code: Select all

%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen
You have to use absolute path informations.
old man
Newbie
Posts: 6
Joined: Sun Dec 25, 2011 6:01 am

Post by old man »

I'm having trouble getting this to work. I get an error on winxp when I try to build the library:

"gcc: installation problem, cannot exec cc1: no such file or directory"

I have my path variables declared as "user variables" should I make them "system variables" instead?

edit: no that isn't it. The tutorial says there may be problems if other versions of gcc are installed, and I do have copies of cygwin and mingw, but they are in entirely different folders and neither have environment variables defined for them. So, I don't see how there could be conflicts.

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

Post by Stef »

old man wrote:I'm having trouble getting this to work. I get an error on winxp when I try to build the library:

"gcc: installation problem, cannot exec cc1: no such file or directory"
...
So, I don't see how there could be conflicts.
...
Are you sure your PATH variable is not pointing to your others GCC installation bin directory ? and did you set the SGDK bin directory in your PATH ?
old man
Newbie
Posts: 6
Joined: Sun Dec 25, 2011 6:01 am

Post by old man »

OK I got it. I was using a colon instead of a semi colon to separate my path variables. :p (hard to see that little dot) Also, I setup the variables in both the system and user variable dialogues. I don't know if this made any difference though. Does anyone know if this matters or if I should only use one field to set the up in?

edit: now I'm getting undefined reference to 'main' errors. I basically cut and pasted c code from the wiki into a text file and save it as 'helloworld.c'. Then I ran the devkit from that files directory the way the tutorial shows. It didn't work.

I tried the same thing with the sample download from the wiki and it works fine. I also noticed that the downloaded sample had .project and .cproject files included with it. Can I just copy these to my own folders and things work correctly or do I need to custom make these for my projects somehow?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

old man wrote:OK I got it. I was using a colon instead of a semi colon to separate my path variables. :p (hard to see that little dot) Also, I setup the variables in both the system and user variable dialogues. I don't know if this made any difference though. Does anyone know if this matters or if I should only use one field to set the up in?

edit: now I'm getting undefined reference to 'main' errors. I basically cut and pasted c code from the wiki into a text file and save it as 'helloworld.c'. Then I ran the devkit from that files directory the way the tutorial shows. It didn't work.

I tried the same thing with the sample download from the wiki and it works fine. I also noticed that the downloaded sample had .project and .cproject files included with it. Can I just copy these to my own folders and things work correctly or do I need to custom make these for my projects somehow?
It does not matters if you define the GDK env vars in both user and system entries but only one should suffice.
The .project and .cproject files are used by Code::Blocks but there are useless for command lines compilation.
If the downloaded sample does compile then SGDK is ok and you can work with... maybe there is a problem in piece of code in wiki.
What error you obtained ?
old man
Newbie
Posts: 6
Joined: Sun Dec 25, 2011 6:01 am

Post by old man »

OK I figured this one out too. It was my own stupid mistake. I saved my file using notepad and saved it as a txt file on accident so it was saved as helloworld.c.txt. It's annoying that my windows version won't show file extensions. I only found it when I loaded into a code editor. Thanks for the help.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

you're welcome !
Mixail
Very interested
Posts: 133
Joined: Thu Nov 18, 2010 4:47 pm

Post by Mixail »

Image
What to do?
Why is this a bug (error)?
how to fix it?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Mixail wrote:Image
What to do?
Why is this a bug (error)?
how to fix it?
It seems you modified the makelib.gen file as it shouldn't produce that type of error. Can you past the content of your makelib.gen file ?
Mixail
Very interested
Posts: 133
Joined: Thu Nov 18, 2010 4:47 pm

Post by Mixail »

my But files:
Build.bat

Code: Select all

set path=J:\smd_ccp_9\bin
%GDK_WIN%make -f %GDK_WIN%makelib.gen
pause
and

Build2.bat

Code: Select all

set path=J:\smd_ccp_9\bin
make -f makelib.gen
pause
Everywhere gives out an identical error (always gives the same error).
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

The makelib.gen file is used to rebuild the library.
To compile your own project you have to use the makefile.gen file.

Anyway your files are outdated and/or modified... i can't help you this way.

Just download the last SGDK version here :
http://code.google.com/p/sgdk/downloads/list

And follow the basic tutorial here :
http://code.google.com/p/sgdk/wiki/HowToUseSGDK

It's very simple to get it work !
Also verify that you don't have any others GCC toolschain in your PATH variable or it will conflict.
Mixail
Very interested
Posts: 133
Joined: Thu Nov 18, 2010 4:47 pm

Post by Mixail »

give me your Build file, please.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

If you carefully follow the tutorial you *don't need* any build file !
As it's written in the tutorial you just need to type :

Code: Select all

%GDK_WIN%\bin\make -f %GDK_WIN%\makefile.gen
from your project directory.
So if you really want to use a batch file only put this line into.

If you do a fresh install of SGDK and follow correctly this simple tutorial you should get things working !

I'm really a patient guy but i'm starting going crazy with you ! Do i have to repeat 100 times the same thing ?
Post Reply