Page 1 of 3

[Port] I'm trying to port irrlicht to PSPSDK under cygwin...

Posted: Wed Feb 18, 2009 10:28 am
by lokiare
I'm trying to port irrlicht to PSPSDK under cygwin, and I have gotten the library to compile, but when I go to compile the examples the library is giving me linking errors.

Code: Select all

psp-gcc -I../../include/ -Ilibmad/ -I. -I/usr/local/pspdev/psp/sdk/include -O3 -
G0 -D_PSP_FW_VERSION=500  -L-L -L../../libs -L. -L/usr/local/pspdev/psp/sdk/lib
-specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk
/lib/linkfile.prx   main.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lpspirrli
cht -lSDL_image -lSDL -lSDLmain -lc -lpng -lm -lz -ljpeg -lpspwlan -lGLUT -lGLU
-lGL -lpspvfpu -lm -lstdc++ -lpsppower -lpsprtc -lpspgu -lpsphprm -lpspaudio -lp
spdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpsp
net_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o 01.HelloWorld.
elf
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COSOperator.o): In function `irr:
:COSOperator::getSystemMemory(unsigned int*, unsigned int*) const':
COSOperator.cpp:(.text+0x1cc): undefined reference to `sysconf'
COSOperator.cpp:(.text+0x1d8): undefined reference to `sysconf'
COSOperator.cpp:(.text+0x1e4): undefined reference to `sysconf'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::uploadClipPlane(unsigned int)':
COpenGLDriver.cpp:(.text+0x608): undefined reference to `glClipPlane'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::clearZBuffer()':
COpenGLDriver.cpp:(.text+0xb0c): undefined reference to `glGetBooleanv'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::setFog(irr::video::SColor, bool, float, float, float, b
ool, bool)':
COpenGLDriver.cpp:(.text+0xe2c): undefined reference to `glHint'
COpenGLDriver.cpp:(.text+0xee0): undefined reference to `glHint'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::setBasicRenderStates(irr::video::SMaterial const&, irr:
:video::SMaterial const&, bool)':
COpenGLDriver.cpp:(.text+0x3ab0): undefined reference to `glPointSize'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::enableClipPlane(unsigned int, bool)':
COpenGLDriver.cpp:(.text+0x4974): undefined reference to `glClipPlane'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::setTransform(irr::video::E_TRANSFORMATION_STATE, irr::c
ore::CMatrix4<float> const&)':
COpenGLDriver.cpp:(.text+0x4c1c): undefined reference to `glClipPlane'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::draw2DRectangle(irr::video::SColor, irr::core::rect<int
> const&, irr::core::rect<int> const*)':
COpenGLDriver.cpp:(.text+0x5de8): undefined reference to `glRectf'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::drawVertexPrimitiveList(void const*, unsigned int, void
 const*, unsigned int, irr::video::E_VERTEX_TYPE, irr::scene::E_PRIMITIVE_TYPE,
irr::video::E_INDEX_TYPE)':
COpenGLDriver.cpp:(.text+0x80f0): undefined reference to `glPointSize'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o): In function `ir
r::video::COpenGLDriver::genericDriverInit(irr::core::dimension2d<int> const&, b
ool)':
COpenGLDriver.cpp:(.text+0x887c): undefined reference to `glHint'
COpenGLDriver.cpp:(.text+0x88b0): undefined reference to `glHint'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLTexture.o): In function `i
rr::video::COpenGLTexture::unbindRTT()':
COpenGLTexture.cpp:(.text+0x5ac): undefined reference to `glCopyTexSubImage2D'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLTexture.o): In function `i
rr::video::COpenGLTexture::lock(bool)':
COpenGLTexture.cpp:(.text+0x8b4): undefined reference to `glGetTexImage'
collect2: ld returned 1 exit status
make: *** [01.HelloWorld.elf] Error 1
That is my output, does anyone know what is wrong with this or how I can fix it?

p.s. - don't tell me to use LTE either I am already doing that on another project, but I want the features of Irrlicht 1.5 in the future. I also want a real port that works with PSPSDK

Posted: Wed Feb 18, 2009 12:59 pm
by hybrid
sysconf might require an additional include on your system, the gl calls seem to be unsupported by your OpenGL emulation layer. You need to check what happens at those places, and if you can disable them or have to work around.

Posted: Wed Feb 18, 2009 6:34 pm
by lokiare
What is sysconf and what is it for exactly? I tried to #ifdef __PSPSDK__ it out but I guess it didn't work

Posted: Wed Feb 18, 2009 7:52 pm
by hybrid
sysconf is a POSIX function to query system properties, in this place available memory. If you use ifdef it should work, just do it right :wink:

Posted: Wed Feb 18, 2009 9:24 pm
by lokiare
Ok, I've had to start over. In the end I may need someone to implement the makefile for me, because I don't know much about makefiles, but that shouldn't be too difficult. I've gone through and put a new platform define in the irrCompileConfig.h and I've been solving problems using that platform define, so that at some point this port can be integrated into the "official" releases of irrlicht with minimal fuss. So far this has me stumped:

Code: Select all

psp-g++ -Wall -pipe -g -D_DEBUG -I../../include -I/usr/local/pspdev/psp/sdk/psp/
include -I/psp/sdk/include -DIRRLICHT_EXPORTS=1  -c -o COpenGLNormalMapRenderer.
o COpenGLNormalMapRenderer.cpp
In file included from COpenGLDriver.h:24,
                 from COpenGLNormalMapRenderer.cpp:13:
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenPrograms(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:894: error: 'glGenProgramsARB' was not declared in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindProgram(GLenum, GLuint)':
COpenGLExtensionHandler.h:906: error: 'glBindProgramARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlProgramString(GLenum, GLenum, GLsizei, const GLvoid*)':
COpenGLExtensionHandler.h:918: error: 'glProgramStringARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeletePrograms(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:930: error: 'glDeleteProgramsARB' was not declared in
this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlProgramLocalParameter4fv(GLenum, GLuint, const GLfloat*)':
COpenGLExtensionHandler.h:942: error: 'glProgramLocalParameter4fvARB' was not de
clared in this scope
COpenGLExtensionHandler.h: In member function 'GLhandleARB irr::video::COpenGLEx
tensionHandler::extGlCreateShaderObject(GLenum)':
COpenGLExtensionHandler.h:954: error: 'glCreateShaderObjectARB' was not declared
 in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlShaderSource(GLhandleARB, int, const char**, int*)':
COpenGLExtensionHandler.h:967: error: 'glShaderSourceARB' was not declared in th
is scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlCompileShader(GLhandleARB)':
COpenGLExtensionHandler.h:979: error: 'glCompileShaderARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'GLhandleARB irr::video::COpenGLEx
tensionHandler::extGlCreateProgramObject()':
COpenGLExtensionHandler.h:991: error: 'glCreateProgramObjectARB' was not declare
d in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlAttachObject(GLhandleARB, GLhandleARB)':
COpenGLExtensionHandler.h:1004: error: 'glAttachObjectARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlLinkProgram(GLhandleARB)':
COpenGLExtensionHandler.h:1016: error: 'glLinkProgramARB' was not declared in th
is scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUseProgramObject(GLhandleARB)':
COpenGLExtensionHandler.h:1028: error: 'glUseProgramObjectARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteObject(GLhandleARB)':
COpenGLExtensionHandler.h:1040: error: 'glDeleteObjectARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetInfoLog(GLhandleARB, GLsizei, GLsizei*, GLcharARB*)':
COpenGLExtensionHandler.h:1052: error: 'glGetInfoLogARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetObjectParameteriv(GLhandleARB, GLenum, int*)':
COpenGLExtensionHandler.h:1064: error: 'glGetObjectParameterivARB' was not decla
red in this scope
COpenGLExtensionHandler.h: In member function 'GLint irr::video::COpenGLExtensio
nHandler::extGlGetUniformLocation(GLhandleARB, const char*)':
COpenGLExtensionHandler.h:1076: error: 'glGetUniformLocationARB' was not declare
d in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform4fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1089: error: 'glUniform4fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform1iv(GLint, GLsizei, const GLint*)':
COpenGLExtensionHandler.h:1101: error: 'glUniform1ivARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform1fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1113: error: 'glUniform1fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform2fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1125: error: 'glUniform2fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform3fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1137: error: 'glUniform3fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniformMatrix2fv(GLint, GLsizei, GLboolean, const GLfloat*)':
COpenGLExtensionHandler.h:1149: error: 'glUniformMatrix2fvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniformMatrix3fv(GLint, GLsizei, GLboolean, const GLfloat*)':
COpenGLExtensionHandler.h:1161: error: 'glUniformMatrix3fvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniformMatrix4fv(GLint, GLsizei, GLboolean, const GLfloat*)':
COpenGLExtensionHandler.h:1173: error: 'glUniformMatrix4fvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetActiveUniform(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, G
Lenum*, GLcharARB*)':
COpenGLExtensionHandler.h:1187: error: 'glGetActiveUniformARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlPointParameterf(GLint, GLfloat)':
COpenGLExtensionHandler.h:1199: error: 'glPointParameterfARB' was not declared i
n this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlPointParameterfv(GLint, const GLfloat*)':
COpenGLExtensionHandler.h:1211: error: 'glPointParameterfvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlStencilFuncSeparate(GLenum, GLenum, GLint, GLuint)':
COpenGLExtensionHandler.h:1225: error: 'glStencilFuncSeparate' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlStencilOpSeparate(GLenum, GLenum, GLenum, GLenum)':
COpenGLExtensionHandler.h:1241: error: 'glStencilOpSeparate' was not declared in
 this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindFramebuffer(GLenum, GLuint)':
COpenGLExtensionHandler.h:1268: error: 'glBindFramebufferEXT' was not declared i
n this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteFramebuffers(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:1280: error: 'glDeleteFramebuffersEXT' was not declare
d in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenFramebuffers(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:1292: error: 'glGenFramebuffersEXT' was not declared i
n this scope
COpenGLExtensionHandler.h: In member function 'GLenum irr::video::COpenGLExtensi
onHandler::extGlCheckFramebufferStatus(GLenum)':
COpenGLExtensionHandler.h:1306: error: 'glCheckFramebufferStatusEXT' was not dec
lared in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlFramebufferTexture2D(GLenum, GLenum, GLenum, GLuint, GLint)':
COpenGLExtensionHandler.h:1319: error: 'glFramebufferTexture2DEXT' was not decla
red in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindRenderbuffer(GLenum, GLuint)':
COpenGLExtensionHandler.h:1331: error: 'glBindRenderbufferEXT' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteRenderbuffers(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:1343: error: 'glDeleteRenderbuffersEXT' was not declar
ed in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenRenderbuffers(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:1355: error: 'glGenRenderbuffersEXT' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlRenderbufferStorage(GLenum, GLenum, GLsizei, GLsizei)':
COpenGLExtensionHandler.h:1367: error: 'glRenderbufferStorageEXT' was not declar
ed in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlFramebufferRenderbuffer(GLenum, GLenum, GLenum, GLuint)':
COpenGLExtensionHandler.h:1379: error: 'glFramebufferRenderbufferEXT' was not de
clared in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlActiveStencilFace(GLenum)':
COpenGLExtensionHandler.h:1391: error: 'glActiveStencilFaceEXT' was not declared
 in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenBuffers(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:1404: error: 'glGenBuffers' was not declared in this s
cope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindBuffer(GLenum, GLuint)':
COpenGLExtensionHandler.h:1416: error: 'glBindBuffer' was not declared in this s
cope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBufferData(GLenum, GLsizeiptrARB, const GLvoid*, GLenum)':
COpenGLExtensionHandler.h:1428: error: 'glBufferData' was not declared in this s
cope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteBuffers(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:1440: error: 'glDeleteBuffers' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBufferSubData(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid*)':

COpenGLExtensionHandler.h:1452: error: 'glBufferSubData' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetBufferSubData(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid*)':
COpenGLExtensionHandler.h:1464: error: 'glGetBufferSubData' was not declared in
this scope
COpenGLExtensionHandler.h: In member function 'void* irr::video::COpenGLExtensio
nHandler::extGlMapBuffer(GLenum, GLenum)':
COpenGLExtensionHandler.h:1477: error: 'glMapBuffer' was not declared in this sc
ope
COpenGLExtensionHandler.h: In member function 'GLboolean irr::video::COpenGLExte
nsionHandler::extGlUnmapBuffer(GLenum)':
COpenGLExtensionHandler.h:1491: error: 'glUnmapBuffer' was not declared in this
scope
COpenGLExtensionHandler.h: In member function 'GLboolean irr::video::COpenGLExte
nsionHandler::extGlIsBuffer(GLuint)':
COpenGLExtensionHandler.h:1505: error: 'glIsBuffer' was not declared in this sco
pe
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetBufferParameteriv(GLenum, GLenum, GLint*)':
COpenGLExtensionHandler.h:1518: error: 'glGetBufferParameteriv' was not declared
 in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetBufferPointerv(GLenum, GLenum, GLvoid**)':
COpenGLExtensionHandler.h:1530: error: 'glGetBufferPointerv' was not declared in
 this scope
make: *** [COpenGLNormalMapRenderer.o] Error 1
What would be the best way to handle these kinds of problems? should I go through and individually #ifdef _IRR_PSP_PLATFORM_ them out, or am I just missing some include or file?

Posted: Wed Feb 18, 2009 10:09 pm
by hybrid
No, just undef the extension pointer define in IrrCompileConfig.h

Posted: Wed Feb 18, 2009 10:40 pm
by lokiare
Ok, I did that and it seems to work, but I have a new and weird problem:

Code: Select all

/usr/local/pspdev/psp/sdk/lib/build.mak:202: warning: ignoring old commands for
target `clean'
psp-g++ -Wall -pipe -g -D_DEBUG -I../../include/  -I/include -I/usr/local/pspdev
/psp/sdk../include -I/usr/local/pspdev/psp/sdk../../include -DIRRLICHT_EXPORTS=1
  -c -o CFileList.o CFileList.cpp
In file included from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/includ
e/dirent.h:6,
                 from CFileList.cpp:14:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/sys/dirent.h:11:34:
error: pspiofilemgr_dirent.h: No such file or directory
CFileList.cpp:16:25: error: pspsystimer.h: No such file or directory
In file included from /usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/includ
e/dirent.h:6,
                 from CFileList.cpp:14:
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/sys/dirent.h:18: err
or: 'SceIoStat' does not name a type
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/include/sys/dirent.h:27: err
or: 'SceUID' does not name a type
CFileList.cpp: In constructor 'irr::io::CFileList::CFileList()':
CFileList.cpp:116: error: aggregate 'irr::io::stat buf' has incomplete type and
cannot be defined
CFileList.cpp:117: error: invalid use of incomplete type 'struct irr::io::stat'
CFileList.cpp:116: error: forward declaration of 'struct irr::io::stat'
CFileList.cpp:120: error: 'S_ISDIR' was not declared in this scope
CFileList.cpp:126: error: 'struct dirent' has no member named 'd_type'
CFileList.cpp:126: error: 'DT_DIR' was not declared in this scope
It is probably something to do with my makefile:

Code: Select all

VERSION = 1.5
TARGET_LIB = libpspirrlicht.a
# Irrlicht Engine 1.5
# Makefile for Linux
#
# To use, just run:
#
# make
#
# This will compile Irrlicht, create a static lib (libIrrlicht.a), and copy it
# into the subdirectory lib/Linux. That's all.
#
# If you want Irrlicht to be compiled as shared lib (libIrrlicht.so.versionnumber), then run:
#
# make sharedlib
# make install
#
# Please note that Irrlicht as shared lib is just experimental and
# probably not tested.
#

#List of object files, separated based on engine architecture
IRRMESHLOADER = CBSPMeshFileLoader.o CMD2MeshFileLoader.o CMD3MeshFileLoader.o CMS3DMeshFileLoader.o CB3DMeshFileLoader.o C3DSMeshFileLoader.o COgreMeshFileLoader.o COBJMeshFileLoader.o CColladaFileLoader.o CCSMLoader.o CDMFLoader.o CLMTSMeshFileLoader.o CMY3DMeshFileLoader.o COCTLoader.o CXMeshFileLoader.o CIrrMeshFileLoader.o CSTLMeshFileLoader.o CLWOMeshFileLoader.o
IRRMESHWRITER = CColladaMeshWriter.o CIrrMeshWriter.o CSTLMeshWriter.o COBJMeshWriter.o
IRRMESHOBJ = $(IRRMESHLOADER) $(IRRMESHWRITER) \
	CSkinnedMesh.o CBoneSceneNode.o CMeshSceneNode.o \
	CAnimatedMeshSceneNode.o CAnimatedMeshMD2.o CAnimatedMeshMD3.o \
	CQ3LevelMesh.o CQuake3ShaderSceneNode.o
IRROBJ = CBillboardSceneNode.o CCameraSceneNode.o CDummyTransformationSceneNode.o CEmptySceneNode.o CGeometryCreator.o CLightSceneNode.o CMeshManipulator.o CMetaTriangleSelector.o COctTreeSceneNode.o COctTreeTriangleSelector.o CSceneCollisionManager.o CSceneManager.o CShadowVolumeSceneNode.o CSkyBoxSceneNode.o CSkyDomeSceneNode.o CTerrainSceneNode.o CTerrainTriangleSelector.o CVolumeLightSceneNode.o CCubeSceneNode.o CSphereSceneNode.o CTextSceneNode.o CTriangleBBSelector.o CTriangleSelector.o CWaterSurfaceSceneNode.o CMeshCache.o CDefaultSceneNodeAnimatorFactory.o CDefaultSceneNodeFactory.o
IRRPARTICLEOBJ = CParticleAnimatedMeshSceneNodeEmitter.o CParticleBoxEmitter.o CParticleCylinderEmitter.o CParticleMeshEmitter.o CParticlePointEmitter.o CParticleRingEmitter.o CParticleSphereEmitter.o CParticleAttractionAffector.o CParticleFadeOutAffector.o CParticleGravityAffector.o CParticleRotationAffector.o CParticleSystemSceneNode.o CParticleScaleAffector.o
IRRANIMOBJ = CSceneNodeAnimatorCameraFPS.o CSceneNodeAnimatorCameraMaya.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorFollowSpline.o CSceneNodeAnimatorRotation.o CSceneNodeAnimatorTexture.o
IRRDRVROBJ = CNullDriver.o COpenGLDriver.o COpenGLNormalMapRenderer.o COpenGLParallaxMapRenderer.o COpenGLShaderMaterialRenderer.o COpenGLTexture.o COpenGLSLMaterialRenderer.o COpenGLExtensionHandler.o CD3D8Driver.o CD3D8NormalMapRenderer.o CD3D8ParallaxMapRenderer.o CD3D8ShaderMaterialRenderer.o CD3D8Texture.o CD3D9Driver.o CD3D9HLSLMaterialRenderer.o CD3D9NormalMapRenderer.o CD3D9ParallaxMapRenderer.o CD3D9ShaderMaterialRenderer.o CD3D9Texture.o
IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderJPG.o CImageLoaderPCX.o CImageLoaderPNG.o CImageLoaderPSD.o CImageLoaderTGA.o CImageLoaderPPM.o CImageLoaderWAL.o \
	CImageWriterBMP.o CImageWriterJPG.o CImageWriterPCX.o CImageWriterPNG.o CImageWriterPPM.o CImageWriterPSD.o CImageWriterTGA.o
IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryReadFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CZipReader.o CPakReader.o irrXML.o CAttributes.o
IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceStub.o CIrrDeviceWin32.o CLogger.o COSOperator.o Irrlicht.o os.o
IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o
ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcphuff.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdphuff.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jidctred.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o
LIBPNGOBJ = libpng/png.o libpng/pngerror.o libpng/pngget.o libpng/pngmem.o libpng/pngpread.o libpng/pngread.o libpng/pngrio.o libpng/pngrtran.o libpng/pngrutil.o libpng/pngset.o libpng/pngtrans.o libpng/pngwio.o libpng/pngwrite.o libpng/pngwtran.o libpng/pngwutil.o
# Next variable is for additional scene nodes etc. of customized Irrlicht versions
EXTRAOBJ =
LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
	$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
	$(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(EXTRAOBJ)
OBJS = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
	$(IRRVIDEOOBJ) $(IRRSWRENDEROBJ) $(IRRIOOBJ) $(IRROTHEROBJ) \
	$(IRRGUIOBJ) $(ZLIBOBJ) $(JPEGLIBOBJ) $(LIBPNGOBJ) $(EXTRAOBJ)

###############
#Compiler flags
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
PSP_FW_VERSION = 500

CXXINCS = -I../../include/  -I$(PSPSKD)/include -I$(PSPSDK)../include -I$(PSPSDK)../../include
#INCDIR = ../include/
#-Izlib -Ijpeglib -Ilibpng
CPPFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1
CXXFLAGS = -Wall -pipe
ifndef NDEBUG
CXXFLAGS += -g -D_DEBUG
else
CXXFLAGS += -fexpensive-optimizations -O3
endif
ifdef PROFILE
CXXFLAGS += -pg
endif
CFLAGS := -fexpensive-optimizations -O3 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES

sharedlib sharedlib_osx: CXXFLAGS += -fpic
sharedlib sharedlib_osx: CFLAGS += -fpic

#multilib handling
ifeq ($(HOSTTYPE), x86_64)
LIBSELECT=64
endif

#Linux specific options
staticlib sharedlib install: SYSTEM = Linux
STATIC_LIB = libIrrlicht.a
IRRLICHT_DLL := ../../bin/Win32-gcc/Irrlicht.dll
LIB_PATH = ../../lib/$(SYSTEM)
INSTALL_DIR = /usr/local/lib
sharedlib: SHARED_LIB = libIrrlicht.so
staticlib sharedlib: LDFLAGS = --no-export-all-symbols --add-stdcall-alias
sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
staticlib sharedlib: CXXINCS += -I/usr/X11R6/include

#OSX specific options
staticlib_osx sharedlib_osx install_osx: SYSTEM = MacOSX
staticlib_osx sharedlib_osx: IRROTHEROBJ += MacOSX/CIrrDeviceMacOSX.o MacOSX/OSXClipboard.o MacOSX/AppDelegate.o
staticlib_osx sharedlib_osx: CXXINCS += -IMacOSX -I/usr/X11R6/include
sharedlib_osx: SHARED_LIB = libIrrlicht.dylib
staticlib_osx sharedlib_osx: LDFLAGS = --no-export-all-symbols --add-stdcall-alias
sharedlib_osx: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm

#Windows specific options
sharedlib_win32 staticlib_win32: SYSTEM = Win32-gcc
sharedlib_win32: LDFLAGS = -lgdi32 -lopengl32 -ld3dx9d -lwinmm
sharedlib_win32 staticlib_win32: CPPFLAGS += -DIRR_COMPILE_WITH_DX9_DEV_PACK -D__GNUWIN32__ -D_WIN32 -DWIN32 -D_WINDOWS -D_MBCS -D_USRDLL
staticlib_win32: CPPFLAGS += -D_IRR_STATIC_LIB_

####################
# All target, builds Irrlicht as static lib (libIrrlicht.a) and copies it into /lib/Linux
all linux: staticlib

# Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into /lib/Linux
sharedlib: $(LINKOBJ)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).1 -fPIC -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
	cp $(SHARED_LIB).$(VERSION) $(LIB_PATH)

# Builds Irrlicht as static lib (libIrrlicht.a)
$(STATIC_LIB): $(LINKOBJ)
	$(AR) rs $@ $^

# Copies static lib into /lib/Linux
staticlib staticlib_osx: $(STATIC_LIB)
	cp $^ $(LIB_PATH)

# Builds Irrlicht as dll (Irrlicht.dll) into ../../bin/Win32-gcc
all_win32 win32: sharedlib_win32
sharedlib_win32: $(IRRLICHT_DLL)
../../bin/Win32-gcc/Irrlicht.dll: $(LINKOBJ)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -o $@ $^ $(LDFLAGS) -Wl,--out-implib,../../lib/Win32-gcc/$(STATIC_LIB)
# Copies static lib into /lib/Win32-gcc
staticlib_win32: $(STATIC_LIB)
	cp $^ $(LIB_PATH)

# Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into /lib/Linux
sharedlib_osx: $(LINKOBJ)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -dynamiclib -Wl,-install_name,$(SHARED_LIB).1 -fPIC -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
	cp $(SHARED_LIB).$(VERSION) $(LIB_PATH)

# Installs Irrlicht if it was created as shared lib
install:
	cp $(LIB_PATH)/$(SHARED_LIB).$(VERSION) $(INSTALL_DIR)
	cd $(INSTALL_DIR) && ln -s libIrrlicht.so.$(VERSION) $(SHARED_LIB)
	ldconfig -n $(INSTALL_DIR)

install_osx:
	cp $(LIB_PATH)/$(SHARED_LIB).$(VERSION) $(INSTALL_DIR)
	cd $(INSTALL_DIR) && ln -s libIrrlicht.dylib.$(VERSION) $(SHARED_LIB)
	ldconfig -n $(INSTALL_DIR)

TAGS:
	ctags *.cpp ../../include/*.h *.h

# Create dependency files for automatic recompilation
%.d:%.cpp
	$(CXX) $(CPPFLAGS) -MM -MF $@ $<

# Create object files from objective-c code
%.o:%.mm
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

ifneq ($(MAKECMDGOALS),clean)
-include $(LINKOBJ:.o=.d)
endif

help:
	@echo "Available targets for Irrlicht"
	@echo " sharedlib: Build shared library Irrlicht.so for Linux"
	@echo " staticlib: Build static library Irrlicht.a for Linux"
	@echo " install: Copy shared library to /usr/lib"
	@echo ""
	@echo " sharedlib_win32: Build shared library Irrlicht.dll for Windows"
	@echo " staticlib_win32: Build static library Irrlicht.a for Windows"
	@echo ""
	@echo " clean: Clean up directory"

# Cleans all temporary files and compilation results.
clean:
	$(RM) $(LINKOBJ) $(SHARED_LIB).$(VERSION) $(STATIC_LIB) $(LINKOBJ:.o=.d)

.PHONY: all sharedlib staticlib sharedlib_win32 staticlib_win32 help install clean
I'm not a makefile expert, and I know the makefile is probably mangled, but the files I get an error on are located in the directory "$(PSPSDK)/include"
$(PSPSDK) is equal to /usr/local/pspdev/psp/sdk

Posted: Wed Feb 18, 2009 10:47 pm
by lokiare
Ok, by adding "-I($PSPSDK)../../sdk/include" I was able to get rid of some of that problem (this is the relative directory to the indicated files from the "sys/dirent.h" in the pspsdk)

My problem now is limited to:

Code: Select all

Makefile:176: warning: overriding commands for target `clean'
/usr/local/pspdev/psp/sdk/lib/build.mak:202: warning: ignoring old commands for
target `clean'
psp-g++ -Wall -pipe -g -D_DEBUG -I../../include/ -I/include -I/usr/local/pspdev/
psp/sdk../include -I/usr/local/pspdev/psp/sdk../../include -I/usr/local/pspdev/p
sp/sdk../../sdk/include -DIRRLICHT_EXPORTS=1  -c -o CFileList.o CFileList.cpp
CFileList.cpp: In constructor 'irr::io::CFileList::CFileList()':
CFileList.cpp:116: error: aggregate 'irr::io::stat buf' has incomplete type and
cannot be defined
CFileList.cpp:117: error: invalid use of incomplete type 'struct irr::io::stat'
CFileList.cpp:116: error: forward declaration of 'struct irr::io::stat'
CFileList.cpp:120: error: 'S_ISDIR' was not declared in this scope
CFileList.cpp:126: error: 'struct dirent' has no member named 'd_type'
CFileList.cpp:126: error: 'DT_DIR' was not declared in this scope
Anyone know what I can do to fix this problem?

Posted: Wed Feb 18, 2009 11:28 pm
by lokiare
Ok, now I have a different problem:

Code: Select all

CFileSystem.cpp: In member function 'virtual irr::core::stringc irr::io::CFileSy
stem::getAbsolutePath(const irr::core::stringc&) const':
CFileSystem.cpp:218: error: 'realpath' was not declared in this scope
make: *** [CFileSystem.o] Error 1
This is referring to this code:

Code: Select all

c8 fpath[4096];
fpath[0]=0;
p = realpath(filename.c_str(), fpath);
if (!p)
I'm completely at a loss as to what is going on here. cygwin has this function I think.

Posted: Thu Feb 19, 2009 12:41 am
by lokiare
Ok ignore my last several message other than the realpath one. Now I've got it to compile as a library for the psp. Now I'm getting problems with ambiguous types such as u32, and s32 when I compile one of the examples for PSP. These apparently are defined in the pspsdk as well as irrlicht. How do I make the compiler choose one over the other? or am I missing something. My output is as follows:

Code: Select all

In file included from /usr/local/pspdev/psp/sdk/include/pspuser.h:29,
                 from /usr/local/pspdev/psp/sdk/include/pspkernel.h:18,
                 from main.cpp:90:
/usr/local/pspdev/psp/sdk/include/pspintrman.h:153: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:153: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:153: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:154: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:154: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:154: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:155: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:155: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:155: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:156: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:156: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:156: error: 'u16' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:157: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:157: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:157: error: 'u16' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:158: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:158: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:158: error: 'u16' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:159: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:159: error: reference to 'u16' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:40: error: candidates are: typedef
uint16_t u16
../../include/irrTypes.h:40: error:                 typedef short unsigned int i
rr::u16
/usr/local/pspdev/psp/sdk/include/pspintrman.h:159: error: 'u16' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:160: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:160: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:160: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:161: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:161: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:161: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:162: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:162: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:162: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:163: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:163: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:163: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:164: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:164: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:164: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:165: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:165: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:165: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:166: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:166: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:166: error: 'u32' does not name a
 type
/usr/local/pspdev/psp/sdk/include/pspintrman.h:167: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:167: error: reference to 'u32' is
 ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspintrman.h:167: error: 'u32' does not name a
 type
In file included from /usr/local/pspdev/psp/sdk/include/pspkernel.h:19,
                 from main.cpp:90:
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:48: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:48: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:48: error: 'u32' does no
t name a type
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:50: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:50: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:50: error: 'u32' does no
t name a type
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:54: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:54: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:54: error: 'u32' does no
t name a type
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:91: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:91: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:91: error: 'u32' does no
t name a type
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:93: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:93: error: reference to
'u32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:42: error: candidates are: typedef
uint32_t u32
../../include/irrTypes.h:58: error:                 typedef unsigned int irr::u3
2
/usr/local/pspdev/psp/sdk/include/pspiofilemgr_kernel.h:93: error: 'u32' does no
t name a type
main.cpp: In function 'int main()':
main.cpp:194: error: reference to 's32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:48: error: candidates are: typedef
int32_t s32
../../include/irrTypes.h:66: error:                 typedef int irr::s32
main.cpp:194: error: template argument 1 is invalid
main.cpp:225: error: reference to 's32' is ambiguous
/usr/local/pspdev/psp/sdk/include/psptypes.h:48: error: candidates are: typedef
int32_t s32
../../include/irrTypes.h:66: error:                 typedef int irr::s32
main.cpp:225: error: template argument 1 is invalid
make: *** [main.o] Error 1

James@lokiare ~/irrlicht-1.5/examples/01.HelloWorld
$

Posted: Thu Feb 19, 2009 9:02 am
by hybrid
Yes, looks like they use the same names. Simply solve it by not calling 'using namespace irr', instead always write irr::s32. Should solve this ambiguity.

Posted: Thu Feb 19, 2009 4:26 pm
by lokiare
Ok, I tried what you said and it got rid of the types problem. The next problem that comes up is this:

Code: Select all

../../lib/PSP/libpspirrlicht.a(COSOperator.o):/home/user/irrlicht-1.5/source/irr
licht/COSOperator.cpp:166: undefined reference to `sysconf'
../../lib/PSP/libpspirrlicht.a(COSOperator.o):/home/user/irrlicht-1.5/source/irr
licht/COSOperator.cpp:167: undefined reference to `sysconf'
../../lib/PSP/libpspirrlicht.a(COSOperator.o):/home/user/irrlicht-1.5/source/irr
licht/COSOperator.cpp:168: undefined reference to `sysconf'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:2980: undefined reference to `glClipPlane'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:2855: undefined reference to `glGetBooleanv'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:2588: undefined reference to `glHint'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:2590: undefined reference to `glHint'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:2107: undefined reference to `glPointSize'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:1590: undefined reference to `glRectf'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:1229: undefined reference to `glPointSize'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:504: undefined reference to `glHint'
../../lib/PSP/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrlicht-1.5/source/i
rrlicht/COpenGLDriver.cpp:513: undefined reference to `glHint'
../../lib/PSP/libpspirrlicht.a(COpenGLTexture.o):/home/user/irrlicht-1.5/source/
irrlicht/COpenGLTexture.cpp:422: undefined reference to `glCopyTexSubImage2D'
../../lib/PSP/libpspirrlicht.a(COpenGLTexture.o):/home/user/irrlicht-1.5/source/
irrlicht/COpenGLTexture.cpp:260: undefined reference to `glGetTexImage'
../../lib/PSP/libpspirrlicht.a(CFileSystem.o):(.rodata._ZTVN3irr2io11CFileSystem
E[vtable for irr::io::CFileSystem]+0x2c): undefined reference to `irr::io::CFile
System::getAbsolutePath(irr::core::string<char, irr::core::irrAllocator<char> >
const&) const'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspevents.o
): In function `EventUpdate':
/home/user/sdl/src/video/psp/SDL_pspevents.c:71: undefined reference to `sceHprm
PeekCurrentKey'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspgl.o): I
n function `PSP_GL_Init':
/home/user/sdl/src/video/psp/SDL_pspgl.c:109: undefined reference to `eglGetDisp
lay'
/home/user/sdl/src/video/psp/SDL_pspgl.c:109: undefined reference to `eglGetErro
r'
/home/user/sdl/src/video/psp/SDL_pspgl.c:110: undefined reference to `eglInitial
ize'
/home/user/sdl/src/video/psp/SDL_pspgl.c:110: undefined reference to `eglGetErro
r'
/home/user/sdl/src/video/psp/SDL_pspgl.c:135: undefined reference to `eglChooseC
onfig'
/home/user/sdl/src/video/psp/SDL_pspgl.c:135: undefined reference to `eglGetErro
r'
/home/user/sdl/src/video/psp/SDL_pspgl.c:143: undefined reference to `eglCreateC
ontext'
/home/user/sdl/src/video/psp/SDL_pspgl.c:143: undefined reference to `eglGetErro
r'
/home/user/sdl/src/video/psp/SDL_pspgl.c:144: undefined reference to `eglCreateW
indowSurface'
/home/user/sdl/src/video/psp/SDL_pspgl.c:144: undefined reference to `eglGetErro
r'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspgl.o): I
n function `PSP_GL_SwapBuffers':
/home/user/sdl/src/video/psp/SDL_pspgl.c:82: undefined reference to `eglSwapBuff
ers'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspgl.o): I
n function `PSP_GL_MakeCurrent':
/home/user/sdl/src/video/psp/SDL_pspgl.c:69: undefined reference to `eglMakeCurr
ent'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspgl.o):(.
rodata+0x6c): undefined reference to `glOrtho'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspgl.o):(.
rodata+0x84): undefined reference to `glPopClientAttrib'
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/libSDL.a(SDL_pspgl.o):(.
rodata+0x9c): undefined reference to `glPushClientAttrib'
collect2: ld returned 1 exit status
make: *** [01.HelloWorld.elf] Error 1
Am I missing some libraries, or what? here is my makefile:

Code: Select all

TARGET = 01.HelloWorld
OBJS = main.o

INCDIR = 
INCDIR = -I ../../include
CFLAGS = -G0 -O0
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

BUILD_PRX = 1
PSP_FW_VERSION = 500
#PSP_LARGE_MEMORY = 1

#libraries (note: I've got the libpspirrlicht installed in the psplibraries folder)
LIBDIR = -L ../../lib/PSP
LDFLAGS =
LIBS= -lpspirrlicht -lpspwlan -lglut -lGLU -lGL -lSDL -lSDL_image -lpng -ljpeg -lz -lpspgu -lpspvfpu -lm -lstdc++ -lpsppower -lpsprtc -lpspaudio

#psp-specific
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = 01.HelloWorld

#psp paths
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

Posted: Thu Feb 19, 2009 4:49 pm
by hybrid
Yes, could be that you're using the wrong OpenGL libs, at least EGL is missing and some OpenGL functions. Also, sysconf is missing again, looks like you didn't disable it properly

Posted: Thu Feb 19, 2009 6:23 pm
by lokiare
Ok I got rid of the sysconf problem. I also disabled the openGL extensions, but I get this when I compile the library:

Code: Select all

In file included from COpenGLDriver.h:24,
                 from COpenGLNormalMapRenderer.cpp:13:
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenPrograms(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:894: error: 'glGenProgramsARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindProgram(GLenum, GLuint)':
COpenGLExtensionHandler.h:906: error: 'glBindProgramARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlProgramString(GLenum, GLenum, GLsizei, const GLvoid*)':
COpenGLExtensionHandler.h:918: error: 'glProgramStringARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeletePrograms(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:930: error: 'glDeleteProgramsARB' was not declared in
this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlProgramLocalParameter4fv(GLenum, GLuint, const GLfloat*)':
COpenGLExtensionHandler.h:942: error: 'glProgramLocalParameter4fvARB' was not de
clared in this scope
COpenGLExtensionHandler.h: In member function 'GLhandleARB irr::video::COpenGLEx
tensionHandler::extGlCreateShaderObject(GLenum)':
COpenGLExtensionHandler.h:954: error: 'glCreateShaderObjectARB' was not declared
 in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlShaderSource(GLhandleARB, int, const char**, int*)':
COpenGLExtensionHandler.h:967: error: 'glShaderSourceARB' was not declared in th
is scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlCompileShader(GLhandleARB)':
COpenGLExtensionHandler.h:979: error: 'glCompileShaderARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'GLhandleARB irr::video::COpenGLEx
tensionHandler::extGlCreateProgramObject()':
COpenGLExtensionHandler.h:991: error: 'glCreateProgramObjectARB' was not declare
d in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlAttachObject(GLhandleARB, GLhandleARB)':
COpenGLExtensionHandler.h:1004: error: 'glAttachObjectARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlLinkProgram(GLhandleARB)':
COpenGLExtensionHandler.h:1016: error: 'glLinkProgramARB' was not declared in th
is scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUseProgramObject(GLhandleARB)':
COpenGLExtensionHandler.h:1028: error: 'glUseProgramObjectARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteObject(GLhandleARB)':
COpenGLExtensionHandler.h:1040: error: 'glDeleteObjectARB' was not declared in t
his scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetInfoLog(GLhandleARB, GLsizei, GLsizei*, GLcharARB*)':
COpenGLExtensionHandler.h:1052: error: 'glGetInfoLogARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetObjectParameteriv(GLhandleARB, GLenum, int*)':
COpenGLExtensionHandler.h:1064: error: 'glGetObjectParameterivARB' was not decla
red in this scope
COpenGLExtensionHandler.h: In member function 'GLint irr::video::COpenGLExtensio
nHandler::extGlGetUniformLocation(GLhandleARB, const char*)':
COpenGLExtensionHandler.h:1076: error: 'glGetUniformLocationARB' was not declare
d in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform4fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1089: error: 'glUniform4fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform1iv(GLint, GLsizei, const GLint*)':
COpenGLExtensionHandler.h:1101: error: 'glUniform1ivARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform1fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1113: error: 'glUniform1fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform2fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1125: error: 'glUniform2fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniform3fv(GLint, GLsizei, const GLfloat*)':
COpenGLExtensionHandler.h:1137: error: 'glUniform3fvARB' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniformMatrix2fv(GLint, GLsizei, GLboolean, const GLfloat*)':
COpenGLExtensionHandler.h:1149: error: 'glUniformMatrix2fvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniformMatrix3fv(GLint, GLsizei, GLboolean, const GLfloat*)':
COpenGLExtensionHandler.h:1161: error: 'glUniformMatrix3fvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlUniformMatrix4fv(GLint, GLsizei, GLboolean, const GLfloat*)':
COpenGLExtensionHandler.h:1173: error: 'glUniformMatrix4fvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetActiveUniform(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, G
Lenum*, GLcharARB*)':
COpenGLExtensionHandler.h:1187: error: 'glGetActiveUniformARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlPointParameterf(GLint, GLfloat)':
COpenGLExtensionHandler.h:1199: error: 'glPointParameterfARB' was not declared i
n this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlPointParameterfv(GLint, const GLfloat*)':
COpenGLExtensionHandler.h:1211: error: 'glPointParameterfvARB' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlStencilFuncSeparate(GLenum, GLenum, GLint, GLuint)':
COpenGLExtensionHandler.h:1225: error: 'glStencilFuncSeparate' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlStencilOpSeparate(GLenum, GLenum, GLenum, GLenum)':
COpenGLExtensionHandler.h:1241: error: 'glStencilOpSeparate' was not declared in
 this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindFramebuffer(GLenum, GLuint)':
COpenGLExtensionHandler.h:1268: error: 'glBindFramebufferEXT' was not declared i
n this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteFramebuffers(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:1280: error: 'glDeleteFramebuffersEXT' was not declare
d in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenFramebuffers(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:1292: error: 'glGenFramebuffersEXT' was not declared i
n this scope
COpenGLExtensionHandler.h: In member function 'GLenum irr::video::COpenGLExtensi
onHandler::extGlCheckFramebufferStatus(GLenum)':
COpenGLExtensionHandler.h:1306: error: 'glCheckFramebufferStatusEXT' was not dec
lared in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlFramebufferTexture2D(GLenum, GLenum, GLenum, GLuint, GLint)':
COpenGLExtensionHandler.h:1319: error: 'glFramebufferTexture2DEXT' was not decla
red in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindRenderbuffer(GLenum, GLuint)':
COpenGLExtensionHandler.h:1331: error: 'glBindRenderbufferEXT' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteRenderbuffers(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:1343: error: 'glDeleteRenderbuffersEXT' was not declar
ed in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenRenderbuffers(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:1355: error: 'glGenRenderbuffersEXT' was not declared
in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlRenderbufferStorage(GLenum, GLenum, GLsizei, GLsizei)':
COpenGLExtensionHandler.h:1367: error: 'glRenderbufferStorageEXT' was not declar
ed in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlFramebufferRenderbuffer(GLenum, GLenum, GLenum, GLuint)':
COpenGLExtensionHandler.h:1379: error: 'glFramebufferRenderbufferEXT' was not de
clared in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlActiveStencilFace(GLenum)':
COpenGLExtensionHandler.h:1391: error: 'glActiveStencilFaceEXT' was not declared
 in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGenBuffers(GLsizei, GLuint*)':
COpenGLExtensionHandler.h:1404: error: 'glGenBuffers' was not declared in this s
cope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBindBuffer(GLenum, GLuint)':
COpenGLExtensionHandler.h:1416: error: 'glBindBuffer' was not declared in this s
cope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBufferData(GLenum, GLsizeiptrARB, const GLvoid*, GLenum)':
COpenGLExtensionHandler.h:1428: error: 'glBufferData' was not declared in this s
cope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlDeleteBuffers(GLsizei, const GLuint*)':
COpenGLExtensionHandler.h:1440: error: 'glDeleteBuffers' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlBufferSubData(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid*)':

COpenGLExtensionHandler.h:1452: error: 'glBufferSubData' was not declared in thi
s scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetBufferSubData(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid*)':
COpenGLExtensionHandler.h:1464: error: 'glGetBufferSubData' was not declared in
this scope
COpenGLExtensionHandler.h: In member function 'void* irr::video::COpenGLExtensio
nHandler::extGlMapBuffer(GLenum, GLenum)':
COpenGLExtensionHandler.h:1477: error: 'glMapBuffer' was not declared in this sc
ope
COpenGLExtensionHandler.h: In member function 'GLboolean irr::video::COpenGLExte
nsionHandler::extGlUnmapBuffer(GLenum)':
COpenGLExtensionHandler.h:1491: error: 'glUnmapBuffer' was not declared in this
scope
COpenGLExtensionHandler.h: In member function 'GLboolean irr::video::COpenGLExte
nsionHandler::extGlIsBuffer(GLuint)':
COpenGLExtensionHandler.h:1505: error: 'glIsBuffer' was not declared in this sco
pe
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetBufferParameteriv(GLenum, GLenum, GLint*)':
COpenGLExtensionHandler.h:1518: error: 'glGetBufferParameteriv' was not declared
 in this scope
COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtension
Handler::extGlGetBufferPointerv(GLenum, GLenum, GLvoid**)':
COpenGLExtensionHandler.h:1530: error: 'glGetBufferPointerv' was not declared in
 this scope
make: *** [COpenGLNormalMapRenderer.o] Error 1
I have the source to the OpenGL version that the PSP uses. I remember reading somewhere that you have to rename a bunch of OpenGL calls to ARB. Where is that and do you think that will fix this problem?

Otherwise I'm just stuck.

If I use the OpenGl extension I get this when I compile the examples:

Code: Select all

/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:2980: undefined reference to `glClipPl
ane'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:2855: undefined reference to `glGetBoo
leanv'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:2588: undefined reference to `glHint'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:2590: undefined reference to `glHint'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:2107: undefined reference to `glPointS
ize'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:1590: undefined reference to `glRectf'

/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:1229: undefined reference to `glPointS
ize'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:504: undefined reference to `glHint'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLDriver.o):/home/user/irrli
cht-1.5/source/irrlicht/COpenGLDriver.cpp:513: undefined reference to `glHint'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLTexture.o):/home/user/irrl
icht-1.5/source/irrlicht/COpenGLTexture.cpp:422: undefined reference to `glCopyT
exSubImage2D'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(COpenGLTexture.o):/home/user/irrl
icht-1.5/source/irrlicht/COpenGLTexture.cpp:260: undefined reference to `glGetTe
xImage'
/usr/local/pspdev/psp/sdk/lib/libpspirrlicht.a(CFileSystem.o):(.rodata._ZTVN3irr
2io11CFileSystemE[vtable for irr::io::CFileSystem]+0x2c): undefined reference to
 `irr::io::CFileSystem::getAbsolutePath(irr::core::string<char, irr::core::irrAl
locator<char> > const&) const'
collect2: ld returned 1 exit status
make: *** [01.HelloWorld.elf] Error 1

Posted: Fri Feb 20, 2009 3:52 am
by lokiare
Sorry to bump this up, but I've nearly got this working, and I'd like to get it working for the PSP community as soon as possible.