forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSPGL in C++ Error

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed Oct 12, 2005 1:34 pm    Post subject: PSPGL in C++ Error Reply with quote

I'm having some trouble with compiling the psp GL test demo. i just renamed the c file to a cpp file. and modified the make file to g++ instead of gcc, and added USE_PSPSDK_LIBC = 1 and extern "C" in the cpp file.

Here the error i get:
Code:

g++    -c -o simple.o simple.cpp
simple.cpp:2:21: pspuser.h: No such file or directory
simple.cpp:3:21: GL/glut.h: No such file or directory
simple.cpp:7: error: expected constructor, destructor, or type conversion before '(' token
simple.cpp:7: error: expected `,' or `;' before '(' token
simple.cpp: In function `int exit_callback(int, int, void*)':
simple.cpp:38: error: `sceKernelExitGame' undeclared (first use this function)
simple.cpp:38: error: (Each undeclared identifier is reported only once for each function it appears in.)
simple.cpp: At global scope:
simple.cpp:43: error: `SceSize' was not declared in this scope
simple.cpp:43: error: expected primary-expression before "void"
simple.cpp:44: error: initializer expression list treated as compound expressionsimple.cpp:44: error: expected `,' or `;' before '{' token
simple.cpp: In function `void setup_callbacks()':
simple.cpp:56: error: `sceKernelCreateThread' undeclared (first use this function)
simple.cpp:57: error: `sceKernelStartThread' undeclared (first use this function)
simple.cpp: In function `void reshape(int, int)':
simple.cpp:64: error: `GLint' undeclared (first use this function)
simple.cpp:64: error: expected `;' before "errcode"
simple.cpp:64: error: `glViewport' undeclared (first use this function)
simple.cpp:64: error: `errcode' undeclared (first use this function)
simple.cpp:64: error: `glGetError' undeclared (first use this function)
simple.cpp:64: error: `GL_NO_ERROR' undeclared (first use this function)
simple.cpp:65: error: expected `;' before "errcode"
simple.cpp:65: error: `GL_PROJECTION' undeclared (first use this function)
simple.cpp:65: error: `glMatrixMode' undeclared (first use this function)
simple.cpp:66: error: expected `;' before "errcode"
simple.cpp:66: error: `glLoadIdentity' undeclared (first use this function)
simple.cpp:67: error: expected `;' before "errcode"
simple.cpp:67: error: `glOrtho' undeclared (first use this function)
simple.cpp:68: error: expected `;' before "errcode"
simple.cpp:68: error: `GL_MODELVIEW' undeclared (first use this function)
simple.cpp:69: error: expected `;' before "errcode"
simple.cpp: In function `void display()':
simple.cpp:78: error: `GLfloat' does not name a type
simple.cpp:79: error: `angle' undeclared (first use this function)
simple.cpp:81: error: `GLint' undeclared (first use this function)
simple.cpp:81: error: expected `;' before "errcode"
simple.cpp:81: error: `GL_MODELVIEW' undeclared (first use this function)
simple.cpp:81: error: `glMatrixMode' undeclared (first use this function)
simple.cpp:81: error: `errcode' undeclared (first use this function)
simple.cpp:81: error: `glGetError' undeclared (first use this function)
simple.cpp:81: error: `GL_NO_ERROR' undeclared (first use this function)
simple.cpp:82: error: expected `;' before "errcode"
simple.cpp:82: error: `glLoadIdentity' undeclared (first use this function)
simple.cpp:83: error: expected `;' before "errcode"
simple.cpp:83: error: `glTranslatef' undeclared (first use this function)
simple.cpp:86: error: expected `;' before "errcode"
simple.cpp:86: error: `glRotatef' undeclared (first use this function)
simple.cpp:88: error: expected `;' before "errcode"
simple.cpp:88: error: `GL_SMOOTH' undeclared (first use this function)
simple.cpp:88: error: `glShadeModel' undeclared (first use this function)
simple.cpp:90: error: expected `;' before "errcode"
simple.cpp:90: error: `GL_COLOR_BUFFER_BIT' undeclared (first use this function)simple.cpp:90: error: `glClear' undeclared (first use this function)
simple.cpp:91: error: expected `;' before "errcode"
simple.cpp:91: error: `GL_TRIANGLES' undeclared (first use this function)
simple.cpp:91: error: `glBegin' undeclared (first use this function)
simple.cpp:92: error: expected `;' before "errcode"
simple.cpp:92: error: `glColor3f' undeclared (first use this function)
simple.cpp:92: error: expected `;' before "errcode"
simple.cpp:92: error: `glVertex3f' undeclared (first use this function)
simple.cpp:93: error: expected `;' before "errcode"
simple.cpp:93: error: expected `;' before "errcode"
simple.cpp:94: error: expected `;' before "errcode"
simple.cpp:94: error: expected `;' before "errcode"
simple.cpp:95: error: expected `;' before "errcode"
simple.cpp:95: error: `glEnd' undeclared (first use this function)
simple.cpp:96: error: `glutSwapBuffers' undeclared (first use this function)
simple.cpp:97: error: `glutPostRedisplay' undeclared (first use this function)
simple.cpp: In function `void joystick(unsigned int, int, int, int)':
simple.cpp:137: error: `GLint' undeclared (first use this function)
simple.cpp:137: error: expected `;' before "errcode"
simple.cpp:137: error: `glClearColor' undeclared (first use this function)
simple.cpp:137: error: `errcode' undeclared (first use this function)
simple.cpp:137: error: `glGetError' undeclared (first use this function)
simple.cpp:137: error: `GL_NO_ERROR' undeclared (first use this function)
simple.cpp: In function `int main(int, char**)':
simple.cpp:146: error: `glutInit' undeclared (first use this function)
simple.cpp:147: error: `glutCreateWindow' undeclared (first use this function)
simple.cpp:148: error: `glutKeyboardFunc' undeclared (first use this function)
simple.cpp:149: error: `glutKeyboardUpFunc' undeclared (first use this function)simple.cpp:150: error: `glutJoystickFunc' undeclared (first use this function)
simple.cpp:151: error: `glutReshapeFunc' undeclared (first use this function)
simple.cpp:152: error: `glutDisplayFunc' undeclared (first use this function)
simple.cpp:153: error: `glutMainLoop' undeclared (first use this function)
make: *** [simple.o] Error 1


This method usually works for any other demo in the sdk. dont know why not in this case.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
sherpya



Joined: 03 Oct 2005
Posts: 61

PostPosted: Wed Oct 12, 2005 2:53 pm    Post subject: Reply with quote

Quote:

simple.cpp:2:21: pspuser.h: No such file or directory
simple.cpp:3:21: GL/glut.h: No such file or directory


your code doesn't find some includes, following errors are generated because of missing definitions that probabily are located in the missing includes.
add -I with the path of these includes

btw are you sure you are using the correct compiler? g++? not psp-g++?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group