gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Compile problems

#37319 - Toadhead - Thu Mar 10, 2005 1:47 pm

Hello,

I used the following guide to set up an Ds-dev envionment:
http://www.aaronrogers.com/nintendods/
I didt everything they said, only I installed it on "F:' instead of C:.

But when I want to compile some source code I get some errors.
I downloaded the tetris source like the tutorial said, and extracted it in the F:\ndsdev\projects\tetris directory.

Than I use:

Code:

f:
cd ndsdev/projects/tetris


To get in the tetris directory.

libpern and libdesk are installed in f:\ndsdev\libpern and f:\ndsdev\projects\libdesk

I edited the makefile in the tetris directory to:

LIBPERN := F:\ndsdev\libpern
LIBDESK := F:\ndsdev\projects\libdesk

When I run "make" from the tetris directory it says:

Code:

F:\ndsdev\projects\tetris>make
make: make: Command not found
make: *** [build] Error 127

F:\ndsdev\projects\tetris>

#37324 - netdroid9 - Thu Mar 10, 2005 2:58 pm

Zazery said:
"Ok I found out that I added the msys environment variable incorrectly. It should have been obvious considering it didn't recognize 'make' as a command. Thanks for the great tutorial it was really helpful."

#37325 - tepples - Thu Mar 10, 2005 3:09 pm

Is there a 'make.exe' in a directory on your PATH? If not, you may not have installed MSYS properly.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#37334 - Toadhead - Thu Mar 10, 2005 3:43 pm

I dont understand it, there need to be a make.exe file in the path "F:\ndsdev\projects\tetris" ??

If so, do I just need to copy the make.exe file everytime I start a new project??

I don't understand :(
Please help, I dont have any experience with stuff like this.

#37336 - arog - Thu Mar 10, 2005 4:56 pm

Code:
F:\ndsdev\projects\tetris>make
make: make: Command not found
make: *** [build] Error 127

F:\ndsdev\projects\tetris>



Again, you have to make sure make is in your path. Open up a command prompt and type make. You should see the following:
Code:
make: *** No targets specified and no makefile found.  Stop.


If you see the following, then your PATH is not set properly:
Code:
'make' is not recognized as an internal or external command,
operable program or batch file.


Go back to Step 3 and see what you did wrong. Basically you need to make sure MSys is properly installed and that C:\ndsdev\msys\1.0\bin is in your PATH. Or in your case F:\ndsdev\msys\1.0\bin.

- Aaron Rogers

#37338 - zazery - Thu Mar 10, 2005 5:06 pm

I also found out you needed to modify 'CommonMakefile.in' when trying to compile the template. I recommend you also update the template files in the Tetris source code since they are different than the template used in that tutorial. While you are at it change the boot code like explained on Natrium42's website.

#37339 - tepples - Thu Mar 10, 2005 5:21 pm

Educate thyself:

http://www.google.com/search?q=ms-dos%20environment%20variables
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#37353 - Toadhead - Thu Mar 10, 2005 8:19 pm

Everything was alright,
Problem is somewere in the tetris source.

When I copied the complete template folder into the tetris directory it finaly started to do something, however this time I get some others errors.

The errors I get now are "IF undeclared, first use this function" etc. etc. (alot of things like this, all undeclared things like DISP_SR etc,)

Anyone know what I did wrong now?

EDIT:
He cant find the NDS.h header file (and some others in the same directory).
Why??

What do I need to do to make it work?


Last edited by Toadhead on Thu Mar 10, 2005 8:28 pm; edited 2 times in total

#37355 - dagamer34 - Thu Mar 10, 2005 8:20 pm

Toadhead wrote:
Everything was alright,
Problem is somewere in the tetris source.

When I copied the complete template folder into the tetris directory it finaly started to do something, however this time I get some others errors.

The errors I get now are "IF undeclared, first use this function" etc. etc. (alot of things like this, all undeclared things like DISP_SR etc,)

Anyone know what I did wrong now?


Use the template project file found directly on Aaron's site (not the offsite linked one to bottledlight.com).
_________________
Little kids and Playstation 2's don't mix. :(

#37356 - Toadhead - Thu Mar 10, 2005 8:28 pm

dagamer34 wrote:
Toadhead wrote:
Everything was alright,
Problem is somewere in the tetris source.

When I copied the complete template folder into the tetris directory it finaly started to do something, however this time I get some others errors.

The errors I get now are "IF undeclared, first use this function" etc. etc. (alot of things like this, all undeclared things like DISP_SR etc,)

Anyone know what I did wrong now?


Use the template project file found directly on Aaron's site (not the offsite linked one to www.bottledlight.com/ds).



Doesnt work either, he cant find the NDS header files :(

#37360 - arog - Thu Mar 10, 2005 9:57 pm

Quote:
Doesnt work either, he cant find the NDS header files :(


I haven't tried to compile the Tetris source, so no comment on that.

You may want to save yourself a lot of headaches and go back through the Day 1 tutorial but install it to your C: drive instead.

- Aaron Rogers

#37428 - Toadhead - Fri Mar 11, 2005 5:28 pm

Alright alright, I will do so :(

I will just re-install everything

#37529 - Toadhead - Sat Mar 12, 2005 5:46 pm

Reinstalled everything in C:\ but still no succes :(

This is what I get:

[Images not permitted - Click here to view it]
[Images not permitted - Click here to view it]

#37531 - dagamer34 - Sat Mar 12, 2005 6:08 pm

Are you sure your path to ndslib is set correctly? Did you edit Install.bat to point to "C:\ndsdev\devkitarm"?
_________________
Little kids and Playstation 2's don't mix. :(

#37533 - zazery - Sat Mar 12, 2005 6:52 pm

I just fixed that same problem you need to set the path in the 'CommonMakefile.in' otherwise it won't work. This is how mine is set up, just change the drive letter and folder names if you moved them different places.
Code:
export NDSLIBPATH   :=   /g/ndsdev/ndslib

I'm actually having a problem compiling the template myself. With the latest revisions of the ndslib 'SUB_DISPLAY_CONTROL' and 'ISPLAY_CONTROL' are undeclared when you make the project. When I comment out those lines it compiles fine. I did a bit of research into the CVS and found dovoto changed the video.cpp under the ARM9 directory, though i'm not sure if that's the problem. Anyone experiencing the same problem after updating their ndslib?

#37535 - Toadhead - Sat Mar 12, 2005 8:05 pm

still trouble, this is my CommonMakefie.in:

Code:

# path to library - this can be deleted if you set the path in windows
export NDSLIBPATH   :=   /c/ndsdev/ndslib

# Name stuck in the GBA header of the DS booter ROM
export GBAHEADERNAME   :=   DSTemplate

#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:

#---------------------------------------------------------------------------------
# the prefix on the compiler executables
#---------------------------------------------------------------------------------
PREFIX      :=   arm-elf-

#---------------------------------------------------------------------------------
# source directories
#---------------------------------------------------------------------------------
SOURCES      := .

#---------------------------------------------------------------------------------
# include directories
#---------------------------------------------------------------------------------
INCLUDES   := .

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS   :=   $(NDSLIBPATH)
#LIBDIRS +=

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project (do not include -l or lib)
#---------------------------------------------------------------------------------
#LIBS   :=   




And this is my Install.bat from ndslib:

Code:

SET DEVDIR=C:\ndsdev\devkitarm

@echo off
echo building the library
make

echo building devkit arm update and copying files
cd startup

make

echo *************************
echo *                       *
echo *       WARNING         *
echo *                       *
echo *************************

echo copy crt files and linkerscript
echo to devkit arm lib directory?
echo (must be done manualy if not)

set /p choice=yes or no?

if not %choice%==yes exit

copy *.o %DEVDIR%\arm-elf\lib\
copy *.ld %DEVDIR%\arm-elf\lib\
copy *.specs %DEVDIR%\arm-elf\lib\
copy thumb\*.o %DEVDIR%\arm-elf\lib\thumb\
copy interwork\*.o %DEVDIR%\arm-elf\lib\interwork\
copy thumb\interwork\*.o %DEVDIR%\arm-elf\lib\thumb\interwork\

pause

#37633 - Toadhead - Mon Mar 14, 2005 4:06 pm

Nobody smart enough to help me?


edit:

Finaly compiled tetris, but still cant compile the template.
I just copied the include and the lib directories from ndslib into the devkitarm include and lib directory. I don't know if this is good or not but this is atleast the only way I can compile stuff. The "normal" way doesn't work.