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 > Can't compile 3d examples from devkitpro

#138049 - seoushi - Sun Aug 19, 2007 1:44 am

I'm trying to compile some of the 3d examples however it complains about missing function definitions. Here is the full output.

Code:
C:\devkitPro\examples\nds\Graphics\3D\nehe\lesson06>make
main.cpp
arm-eabi-g++ -MMD -MP -MF /c/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/build/main.d -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi
-fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/c/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/include -I/c/devkitPro
/libnds/include -I/c/devkitPro/libnds/include -I/c/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/build -DARM9 -fno-rtti -fno-excepti
ons -c /c/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/source/main.cpp -o main.o
c:/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/source/main.cpp: In function 'int main()':
c:/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/source/main.cpp:55: error: 'glInit' was not declared in this scope
c:/devkitPro/libnds/include/nds/arm9/videoGL.inl:17: error: too many arguments to function 'void glClearColor(uint8, uint8, uint8)'
c:/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/source/main.cpp:64: error: at this point in file
c:/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/source/main.cpp:65: error: 'glClearPolyID' was not declared in this scope
c:/devkitPro/libnds/include/nds/arm9/videoGL.inl:112: error: too many arguments to function 'void glFlush()'
c:/devkitPro/examples/nds/Graphics/3D/nehe/lesson06/source/main.cpp:104: error: at this point in file
make[1]: *** [main.o] Error 1
make: *** [build] Error


Is there something I'm forgetting to install?

#138055 - zeruda - Sun Aug 19, 2007 4:32 am

Looks to me like the examples you have are based on a newer version of libnds, so I suggest you hit devkitpro.org, download the latest installer and reinstall libnds.

#138069 - seoushi - Sun Aug 19, 2007 9:38 am

I just installed the newest version from two days ago. unless if r21 came out then I believe I have the newest version.

#138072 - M3d10n - Sun Aug 19, 2007 12:41 pm

By the looking of those errors, it seems the example was made for r20, but it tried compiling against an older version:

- glInit() is new in r20
- glClearColor gained an extra parameter
- glClearPolyID is a new function that allows you to set the polyID of the whole buffer to enable antialiasing against the background
- glFlush() now has a new parameter so you can enable/disable w-buffering and translucent polygon auto-sorting.

Are you sure you installed the newest version on the same location as the previous one? Check your environment variables and see if they are pointing to the correct folders. Also, for sanity reasons, check if libnds is really up to date (go on the include files and confirm the changes I listed above).

#138091 - seoushi - Sun Aug 19, 2007 7:22 pm

I'm really not sure what happened but I got it to work now. I just deleted the old devkitpro folder and reinstalled from the same executable that I had downloaded a few days before.

#138095 - wintermute - Sun Aug 19, 2007 7:55 pm

M3d10n wrote:
By the looking of those errors, it seems the example was made for r20, but it tried compiling against an older version:

- glInit() is new in r20
- glClearColor gained an extra parameter
- glClearPolyID is a new function that allows you to set the polyID of the whole buffer to enable antialiasing against the background
- glFlush() now has a new parameter so you can enable/disable w-buffering and translucent polygon auto-sorting.


r20 is a toolchain version number. None of these changes were toolchain related.

devkitARM comes with several libraries which relate to the various platforms it supports. These have separate version numbers.

seoushi wrote:

I'm really not sure what happened but I got it to work now. I just deleted the old devkitpro folder and reinstalled from the same executable that I had downloaded a few days before.


The devkitPro installer should update everything to the latest versions when you use the update option in the devkitPro start menu.

If you have any more trouble give me a shout.

I'm in the middle of sorting out r21 right now but I may roll a new libnds and examples tarball before I release the new toolchain.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog