Page 21 of 57

Posted: Wed Dec 14, 2011 10:09 pm
by Stef
If you use unmodified makefile from SGDK 0.9 and follow step by step the following tutorial you should get things working.

Posted: Fri Dec 16, 2011 2:38 pm
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?

Posted: Sun Dec 18, 2011 10:03 pm
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.

Posted: Sun Dec 25, 2011 6:10 am
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

Posted: Sun Dec 25, 2011 3:37 pm
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 ?

Posted: Sun Dec 25, 2011 5:38 pm
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?

Posted: Mon Dec 26, 2011 12:25 am
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 ?

Posted: Mon Dec 26, 2011 3:15 am
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.

Posted: Mon Dec 26, 2011 3:08 pm
by Stef
you're welcome !

Posted: Tue Dec 27, 2011 4:36 pm
by Mixail
Image
What to do?
Why is this a bug (error)?
how to fix it?

Posted: Wed Dec 28, 2011 8:47 am
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 ?

Posted: Thu Dec 29, 2011 9:50 am
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).

Posted: Thu Dec 29, 2011 4:18 pm
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.

Posted: Fri Dec 30, 2011 6:14 pm
by Mixail
give me your Build file, please.

Posted: Sun Jan 01, 2012 8:07 pm
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 ?