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 > Problems compiling.....somebody will know what the problem i

#49046 - Dannon - Mon Jul 25, 2005 10:24 pm

When I try to compile, when using the 'make' command as shown and when trying to use Visual C++ I get these errors:

C:\devkitPro\Projects\template>make
rm -rf arm9/arm9.bin
rm -rf arm7/arm7.bin
make -C arm7 -I /c/devkitPro/Projects/template
make[1]: Entering directory `/c/devkitPro/Projects/template/arm7'
mv: missing file argument
Try `mv --help' for more information.
make[2]: [all] Error 1 (ignored)
main.cpp
c:/devkitPro/Projects/template/arm7/main.cpp:6:21: NDS/NDS.h: No such file or directory
c:/devkitPro/Projects/template/arm7/main.cpp:8:27: NDS/ARM7/BIOS.h: No such file or directory
c:/devkitPro/Projects/template/arm7/main.cpp:9:28: NDS/ARM7/touch.h: No such file or directory
c:/devkitPro/Projects/template/arm7/main.cpp:10:28: NDS/ARM7/clock.h: No such file or directory
c:/devkitPro/Projects/template/arm7/main.cpp: In function `void InterruptHandler()':
c:/devkitPro/Projects/template/arm7/main.cpp:18: error: `IF' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:18: error: (Each undeclared identifier is reported only once for each function it appears in.)
c:/devkitPro/Projects/template/arm7/main.cpp:18: error: `IRQ_VBLANK' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:21: error: `IPC' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:24: error: `XKEYS' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:27: error: `TSC_MEASURE_X' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:27: error: `touchRead' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:28: error: `TSC_MEASURE_Y' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:29: error: `TSC_MEASURE_Z1' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:30: error: `TSC_MEASURE_Z2' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:33: error: `uint8' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:33: error: expected primary-expression before ')' token
c:/devkitPro/Projects/template/arm7/main.cpp:33: error: `rtcGetTime' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:34: error: expected primary-expression before ')' token
c:/devkitPro/Projects/template/arm7/main.cpp:34: error: `BCDToInteger' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:37: error: `touchReadTemperature' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp: In function `int main(int, char**)':
c:/devkitPro/Projects/template/arm7/main.cpp:50: error: `rtcReset' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:53: error: `IME' undeclared (firstuse this function)
c:/devkitPro/Projects/template/arm7/main.cpp:54: error: `IRQ_HANDLER' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:55: error: `IE' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:55: error: `IRQ_VBLANK' undeclared(first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:56: error: `IF' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:57: error: `DISP_SR' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:57: error: `DISP_VBLANK_IRQ' undeclared (first use this function)
c:/devkitPro/Projects/template/arm7/main.cpp:61: error: `swiWaitForVBlank' undeclared (first use this function)
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/devkitPro/Projects/template/arm7'
make: *** [all] Error 2

Somebody will see this and know striaght away what the problem is, I've tried setting up the enviroment several times.


Thanks in advance

--Dannon

#49048 - revo - Mon Jul 25, 2005 10:52 pm

add include path /c/devkitPro/ndslib/include if you have one, if not - download ndslib from cvs to /c/devkitPro/ndslib
_________________
[ sorry for all mistakes, but my english isn't as good as I wish it to be ]

#49085 - Dannon - Tue Jul 26, 2005 7:37 am

Still doesn't seem to be working, sorry about being a pain, everything usually works for me, but this seems to be laughing at me!!

Right then I have my folders set out like:

c:\devkitpro\
---|--> devkitArm
---|--> devkitPPC
---|--> libgba
---|--> libnds ( Currently the standard devkitPro library, but I do have ndslib)
---|--> msys
---|--> projects
-------|--> demo1 ( Compiles fine )
-------|--> template ( Does not compile and gets the errors above )


My CommonMakeFile for the tmeplate looks like this:

# path to tools - this can be deleted if you set the path in windows
#export PATH := /c/ndsdev/devkitarm/bin:/bin

# path to library - this can be deleted if you set the path in windows
export NDSLIBPATH := $(DEVKITPRO)/libnds/lib

# 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 := /c/devkitPro/libnds/include

#---------------------------------------------------------------------------------
# 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 :=


I think all of this is set up correctly as far as I can tell though obviously not otherwise it would compile, can anyone see what's wrong?

--Dannon

#49120 - Phan - Tue Jul 26, 2005 6:18 pm

You probably need to define the the DEVKITPRO variable. I'm not quite sure how to do that on a Windows machine.

#49121 - Dannon - Tue Jul 26, 2005 6:28 pm

I have defined DEVKITPRO as an 'Enviroment Variable'

Variable name: DEVKITPRO
Variable value: c:\devkitpro\

Don't know whether it makes a difference but I have also tried '/c/devkitpro' as the variable value.

--Dannon

#49124 - natrium42 - Tue Jul 26, 2005 6:36 pm

Looks like the makefile you are using is for NDSLIB and not LIBNDS.
_________________
www.natrium42.com

#49127 - Dannon - Tue Jul 26, 2005 6:45 pm

Right I tried replacing with libnds with ndslib and the same errors occured. I'm presuming this can't just be a straight replacement though, anyway, I've decided to start installing all of the dev software from scratch, can someone tell me which tutorial to follow for the setup instructions, I have followed about 3 different ones so far and I want to know which one worked for other people.

#49132 - revo - Tue Jul 26, 2005 6:58 pm

try "/c/devkitpro/"

look in Chris Double tutorial to set up all stuff
_________________
[ sorry for all mistakes, but my english isn't as good as I wish it to be ]

#49137 - dovoto - Tue Jul 26, 2005 7:37 pm

Your source files are for ndslib as evidenced by the include directive paths. You need to use an ndslib makefile, or edit the source to use libnds headers (this should be just a matter of changing the #includes). I will try to get the examples from ndslib ported over to libnds then just start updating libnds directly but time is not too plentiful at the moment.
_________________
www.drunkencoders.com

#49143 - Dannon - Tue Jul 26, 2005 8:10 pm

For now I have Chris's demo1 compiling, about to try some others, I wanted to use VC++ as that is what I am used too using, but I can cope, thanks to everybody for help, now on with my first project.....a simple calculator using the touch screen as a keypad, very simple I think, but I should learn a fair bit about the different screens and input, etc...