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 > Noob (I hope) Compiling Error

#154613 - Interrobang - Sat Apr 19, 2008 5:37 am

I downloaded a few examples posted here (Display_Capture and Two_Pass)

Both are giving me the same compile error.
I am using devkitPro-ARM, and all the examples compile fine.

The trouble seems to start with int LoadGLTextures().
Dose this require extra dependencies or something?
Also, towards the end of the errors, sine and cosine are not declared.

Is there something really simple I just need to add to my make file to get the gl and math stuff working?

long list for the patient to read. (Yes, I'm on windows right now.)
Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

d:\>cd devkitPro\Dual3D\Display_Capture

d:\devkitPro\Dual3D\Display_Capture>make
main.cpp
arm-eabi-g++ -MMD -MP -MF /d/devkitPro/Dual3D/Display_Capture/build/main.d -g -W
all -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffast-math -mthumb
-mthumb-interwork -I/d/devkitPro/Dual3D/Display_Capture/include -I/D/devkitPro/l
ibnds/include -I/D/devkitPro/libnds/include -I/d/devkitPro/Dual3D/Display_Captur
e/build -DARM9 -c /d/devkitPro/Dual3D/Display_Capture/source/main.cpp -o main.o
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp: In function 'int LoadGLText
ures()':
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:100: error: 'struct sImage'
has no member named 'data8'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp: In function 'int main()':
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:163: error: 'glViewPort' was
 not declared in this scope
d:/devkitPro/libnds/include/nds/arm9/videoGL.h:1098: error: too few arguments to
 function 'void glClearColor(uint8, uint8, uint8, uint8)'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:166: error: at this point in
 file
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:186: error: 'floatof32' was
not declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:196: error: 'glReset' was no
t declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:203: error: 'floatov10' was
not declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:210: error: 'glIdentity' was
 not declared in this scope
d:/devkitPro/libnds/include/nds/arm9/videoGL.h:601: error: too few arguments to
function 'void glFlush(uint32)'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:255: error: at this point in
 file
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp: In function 'int DrawShip()
':
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:279: error: 'floatof32' was
not declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:283: error: 'f32' was not de
clared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:283: error: expected `;' bef
ore 'sine'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:284: error: expected `;' bef
ore 'cosine'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:285: error: 'cosine' was not
 declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:286: error: 'sine' was not d
eclared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp: In function 'int DrawTeapot
()':
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:311: error: 'floatof32' was
not declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:315: error: 'f32' was not de
clared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:315: error: expected `;' bef
ore 'sine'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:316: error: expected `;' bef
ore 'cosine'
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:317: error: 'cosine' was not
 declared in this scope
d:/devkitPro/Dual3D/Display_Capture/source/main.cpp:318: error: 'sine' was not d
eclared in this scope
make[1]: *** [main.o] Error 1
make: *** [build] Error 2


If you need more info (ssn/asl/bank account/etc.) let me know.

...
EDIT
...
Do I need to update libnds? Did devkitPro give me an old libnds?

#154616 - zeruda - Sat Apr 19, 2008 6:39 am

It looks to me like the programs you have posted were based on an older version of libnds, f32 was removed for example(you have to define it yourself or just use s32/u32 instead) and floatof32 was renamed to floattof32. What I'd suggest is to go to your devkitpro folder and then into the libnds folder, the header files are in there and you can look at those for updated definitions. The other errors look like similar naming issues, pretty minor really.