#67552 - Maverick - Wed Jan 18, 2006 11:58 pm
hello
i have been trying to compile a slightly cut down version of ethos' sourcecode for lesson 2. The cut down part was removing anything that wasnt there to display the scene
Here is my code:
And here is the batch file i am using to compile(the arm7.c file is an empty main() btw):
And when i compile, i get this:
In file included from arm9.c:2:
..\..\opengl\gl.h:6:1: warning: "f32tot16" redefined
In file included from E:\DevKitARM\include\libnds\include/nds.h:63,
from arm9.c:1:
E:\DevKitARM\include\libnds\include/nds/arm9/videoGL.h:91:1: warning: this is the location of the previous definition
In file included from ..\..\opengl\gl.h:15,
from arm9.c:2:
..\..\opengl\/glRoutines.h:6: error: conflicting types for 'glTranslatef32'
E:\DevKitARM\include\libnds\include/nds/arm9/videoGL.inl:88: error: previous definition of 'glTranslatef32' was here
..\..\opengl\/glRoutines.h:8: error: conflicting types for 'glScalef32'
E:\DevKitARM\include\libnds\include/nds/arm9/videoGL.inl:80: error: previous definition of 'glScalef32' was here
Ive ran out of ideas and was wondering if anybody was able to help, or had sorted this problem for themselves already
Thanks for any help
_________________
http://downtou.ne1.net/
i have been trying to compile a slightly cut down version of ethos' sourcecode for lesson 2. The cut down part was removing anything that wasnt there to display the scene
Here is my code:
Code: |
#include <nds.h>
#include "..\..\opengl\gl.h" int main() { powerON(POWER_ALL); videoSetMode(MODE_0_3D); glViewPort(0,0,255,191); glClearColor(0,0,0); glClearDepth(0x7FFF); while (1) { glReset(); gluPerspective(35, 256.0 / 192.0, 0.1, 40); gluLookAt(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glColor3f32(intof32(1),intof32(1),intof32(1)); glLoadIdentity(); glTranslate3f32(floatof32(-1.5),0,intof32(-6)); glBegin(GL_TRIANGLES); glVertex3f32(0, intof32(1), 0); glVertex3f32(intof32(-1), intof32(-1), 0); glVertex3f32(intof32( 1), intof32(-1), 0); glEnd(); glTranslate3f32(intof32(3),0,0); glBegin(GL_QUADS); glVertex3f32(intof32(-1), intof32( 1), 0); glVertex3f32(intof32( 1), intof32( 1), 0); glVertex3f32(intof32( 1), intof32(-1), 0); glVertex3f32(intof32(-1), intof32(-1), 0); glEnd(); glPopMatrix(1); glFlush(); } } |
And here is the batch file i am using to compile(the arm7.c file is an empty main() btw):
Code: |
path=E:\DevKitARM\bin\
arm-elf-gcc -mcpu=arm7tdmi -mtune=arm7tdmi -mthumb-interwork -DARM7 -c arm7.c -oarm7.o arm-elf-gcc -mthumb-interwork -specs=ds_arm7.specs arm7.o -o arm7.elf arm-elf-objcopy -O binary arm7.elf arm7.bin arm-elf-gcc -mcpu=arm9tdmi -mtune=arm9tdmi -mthumb-interwork -DARM9 -IE:\DevKitARM\include\libnds\include -c arm9.c -oarm9.o arm-elf-gcc -mthumb-interwork -specs=ds_arm9.specs arm9.o -o arm9.elf arm-elf-objcopy -O binary arm9.elf arm9.bin ndstool -c arm.nds -9 arm9.bin -7 arm7.bin -b ..\..\icon.bmp "Test;Just a test;To see what it does!" -o ..\..\logo.bin del *.o *.elf *.bin pause |
And when i compile, i get this:
In file included from arm9.c:2:
..\..\opengl\gl.h:6:1: warning: "f32tot16" redefined
In file included from E:\DevKitARM\include\libnds\include/nds.h:63,
from arm9.c:1:
E:\DevKitARM\include\libnds\include/nds/arm9/videoGL.h:91:1: warning: this is the location of the previous definition
In file included from ..\..\opengl\gl.h:15,
from arm9.c:2:
..\..\opengl\/glRoutines.h:6: error: conflicting types for 'glTranslatef32'
E:\DevKitARM\include\libnds\include/nds/arm9/videoGL.inl:88: error: previous definition of 'glTranslatef32' was here
..\..\opengl\/glRoutines.h:8: error: conflicting types for 'glScalef32'
E:\DevKitARM\include\libnds\include/nds/arm9/videoGL.inl:80: error: previous definition of 'glScalef32' was here
Ive ran out of ideas and was wondering if anybody was able to help, or had sorted this problem for themselves already
Thanks for any help
_________________
http://downtou.ne1.net/