Problem compiling an SDL proggy

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
lpopman
Posts: 6
Joined: Tue Mar 28, 2006 8:42 am

Problem compiling an SDL proggy

Post by lpopman »

Hi Guys,

I'm trying to compile an SDL program using a recent (about a week old) toolchain from the svn.

everything compiles ok, then when it comes to link with libGL it barfs the following:

Code: Select all

/usr/local/pspdev/psp/lib/libGL.a(eglCreateContext.o): In function `eglCreateContext':
/usr/local/pspdev/psp/sdk/trunk/pspgl/eglCreateContext.c:43: undefined reference to `pspvfpu_initcontext'
/usr/local/pspdev/psp/lib/libGL.a(eglDestroyContext.o): In function `eglDestroyContext':
/usr/local/pspdev/psp/sdk/trunk/pspgl/eglDestroyContext.c:42: undefined reference to `pspvfpu_deletecontext'
/usr/local/pspdev/psp/lib/libGL.a(glLoadIdentity.o): In function `glLoadIdentity':
/usr/local/pspdev/psp/sdk/trunk/pspgl/glLoadIdentity.c:23: undefined reference to `pspvfpu_use_matrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_context.o): In function `flush_matrix':
/usr/local/pspdev/psp/sdk/trunk/pspgl/pspgl_context.c:108: undefined reference to `pspvfpu_use_matrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_matrix.o): In function `__pspgl_matrix_sync':
/usr/local/pspdev/psp/sdk/trunk/pspgl/pspgl_matrix.c:19: undefined reference to `pspvfpu_use_matrices'
/usr/local/pspdev/psp/lib/libGL.a(pspgl_matrix.o): In function `__pspgl_matrix_load':
/usr/local/pspdev/psp/sdk/trunk/pspgl/pspgl_matrix.c:33: undefined reference to `pspvfpu_use_matrices'
/usr/local/pspdev/psp/lib/libGL.a(glMultMatrixf.o): In function `glMultMatrixf':
/usr/local/pspdev/psp/sdk/trunk/pspgl/glMultMatrixf.c:17: undefined reference to `pspvfpu_use_matrices'
I have the following LIBS line:

LIBS += -L/usr/local/pspdev/psp/lib -L/usr/local/pspdev/psp/sdk/lib -lSDLmain -lSDL -lm -lpspvfpu -lGL -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpspkernel -lpsppower -lpng -lz -lm -lg -lstdc++ -lc -lpsputility -lpng

I even included libpspvfpu incase that might be it, but to no avail... any ideas?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

Linking order can matter, and it looks like that may be the problem here...
If -lpspvfpu is the lib with "pspvfpu_use_matrices" and such, it needs to be after the libs that require it.
Shoot Pixels Not People!
Makeshift Development
lpopman
Posts: 6
Joined: Tue Mar 28, 2006 8:42 am

Post by lpopman »

Thanks man, that sorted it :)

I actually thought that you needed to link stuff like that first to let the later obj's pick up the symbols...ya learn something new every day.

Regards,

Lee
Post Reply