Hi!As mentioned in my previous thread I'm currently trying to port linux Xmoto game to psp.After fighting with sdl functions now I have a very strange problem...
#include <iostream.h>
int main()
{
return 0;
}
- This code compiles with psp-g++ without problems(if saved as main.cpp).This file the error is about(VCommon.h) is a header file,so I don't know what's a problem here.Please help(again) :-D
With that command line, it should be just linking, not compiling anything, so that error doesn't make much sense. If you upload your code again somewhere I'll take a look.
xmscene/../helpers/../VCommon.h:70:20: error: vector.h: No such file or directory
xmscene/../helpers/../VCommon.h:71:19: error: queue.h: No such file or directory
xmscene/../helpers/../VCommon.h:72:17: error: map.h: No such file or directory
xmscene/../helpers/../VCommon.h:73:22: error: iostream.h: No such file or directory
xmscene/../helpers/../VCommon.h:74:21: error: sstream.h: No such file or directory
In the VCommon.h file try flipping the include /'s around see if that makes any difference.
Your makefile is misbehaving because your system clock is screwed up. Half the files in that src.zip are dated August 2007, and so files that are supposed to be getting built are assumed to be already up-to-date. Fix your system clock, then run "find . | xargs touch" to fix all file dates.
Once you do that, run "make clean" followed by "make" and you'll see that you have even more build errors before you get to the link.
The specific reason for the error is because you incorrectly included "xmscene/Zone.h" in the link. You've explicitly listed it in OBJS for some reason.
Your makefile is misbehaving because your system clock is screwed up. Half the files in that src.zip are dated August 2007, and so files that are supposed to be getting built are assumed to be already up-to-date. Fix your system clock, then run "find . | xargs touch" to fix all file dates.
Once you do that, run "make clean" followed by "make" and you'll see that you have even more build errors before you get to the link.
The specific reason for the error is because you incorrectly included "xmscene/Zone.h" in the link. You've explicitly listed it in OBJS for some reason.
Ok,thanks,my system clock was wrong indeed(but I don't know why),and I missed that header file.After few more of my modifications all files compile succesfully,but at linking stage it shows:
psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk/include -G0 -O2 -Wall -D_PSP_FW_VERSION=150 -L. -L/usr/local/pspdev/psp/sdk/lib GameMain.o BuiltInFont.o Image.o VApp.o VBezier.o VDraw.o VDrawOpenGL.o PolyDraw.o VDrawSDLgfx.o VFileIO.o VTexture.o VXml.o DBuffer.o CRCHash.o Theme.o WWW.o Locales.o Packager.o BSP.o Game.o GameMenus.o GUIBestTimes.o GUIButton.o GUI.o GUIFrame.o GUIList.o GUIStatic.o GUITabView.o MotoGame.o MotoGameL.o MPhysics.o PlayerData.o Renderer.o RendererInit.o Replay.o Sound.o UserConfig.o GUIXMoto.o RendererParticles.o RendererBike.o Input.o GameSerializer.o Collision.o GUIEdit.o RendererFBO.o ReplayList.o Stats.o ScriptDynamicObjects.o SomersaultCounter.o GameEvents.o Credits.o GameInit.o GameDrawFrame.o LevelsManager.o xmscene/Level.o xmscene/Zone.o xmscene/Block.o xmscene/Entity.o xmscene/SkyApparence.o xmscene/BikeController.o xmscene/BikeParameters.o xmscene/BikeAnchors.o xmscene/Bike.o image/tim.cpp image/tim_io_stdio.cpp image/tim_jpeg.cpp image/tim_memory_crt.cpp image/tim_png.cpp md5sum/md5.c md5sum/md5file.cpp helpers/VMath.cpp helpers/SwapEndian.cpp helpers/FileCompression.cpp helpers/Color.cpp BuiltInFont.cpp Image.cpp VApp.cpp VBezier.cpp VDraw.cpp VDrawOpenGL.cpp PolyDraw.h PolyDraw.cpp VDrawSDLgfx.cpp VFileIO.cpp VTexture.cpp VXml.cpp tinyxml/tinystr.cpp tinyxml/tinyxml.cpp tinyxml/tinyxmlerror.cpp tinyxml/tinyxmlparser.cpp -L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lstdc++ -llua -lglut -lGLU -lGL -lode -lSDL -lSDLmain -lSDL_gfx -lSDL_mixer -lpng -ljpeg -lz -lpsprtc -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspaudio -lc -lpspuser -lpspkernel -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspuser -lpspkernel -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o Xmoto.elf
image/tim.cpp: In function ‘int tim_get_bytes_per_pixel(tim_pixel_type_t)’:
image/tim.cpp:332: warning: enumeration value ‘TIM_PT_UNKNOWN’ not handled in switch
image/tim_jpeg.cpp: In function ‘int tim_jpeg_load(tim_session_t*, tim_image_t**, tim_image_info_t*, char*)’:
image/tim_jpeg.cpp:545: error: call of overloaded ‘strcasecmp(char*&, const char [6])’ is ambiguous
/usr/local/pspdev/psp/sdk/include/libc/string.h:76: note: candidates are: int strcasecmp(const char*, const char*)
image/tim_jpeg.cpp:41: note: int strcasecmp(char*, char*)
image/tim_jpeg.cpp:546: error: call of overloaded ‘strcasecmp(char*&, const char [6])’ is ambiguous
/usr/local/pspdev/psp/sdk/include/libc/string.h:76: note: candidates are: int strcasecmp(const char*, const char*)
image/tim_jpeg.cpp:41: note: int strcasecmp(char*, char*)
image/tim_jpeg.cpp:581: warning: comparison between signed and unsigned integer expressions
image/tim_jpeg.cpp: In function ‘int tim_jpeg_save(tim_image_t*, char*)’:
image/tim_jpeg.cpp:666: warning: comparison between signed and unsigned integer expressions
image/tim_jpeg.cpp: At global scope:
image/tim_jpeg.cpp:41: warning: ‘int strcasecmp(char*, char*)’ defined but not used
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
./MotoGame.h:101: warning: ‘class vapp::MotoGameHooks’ has virtual functions but non-virtual destructor
helpers/FileCompression.cpp:26:21: error: bzlib.h: No such file or directory
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
helpers/FileCompression.cpp: In static member function ‘static void FileCompression::bunzip2(std::string, std::string)’:
helpers/FileCompression.cpp:34: error: ‘BZFILE’ was not declared in this scope
helpers/FileCompression.cpp:34: error: ‘b_in’ was not declared in this scope
helpers/FileCompression.cpp:45: error: ‘BZ2_bzReadOpen’ was not declared in this scope
helpers/FileCompression.cpp:46: error: ‘BZ_OK’ was not declared in this scope
helpers/FileCompression.cpp:47: error: ‘BZ2_bzReadClose’ was not declared in this scope
helpers/FileCompression.cpp:60: error: ‘BZ_OK’ was not declared in this scope
helpers/FileCompression.cpp:62: error: ‘BZ2_bzRead’ was not declared in this scope
helpers/FileCompression.cpp:63: error: ‘BZ_STREAM_END’ was not declared in this scope
helpers/FileCompression.cpp:67: error: ‘BZ2_bzReadClose’ was not declared in this scope
helpers/FileCompression.cpp:76: error: ‘BZ_STREAM_END’ was not declared in this scope
helpers/FileCompression.cpp:77: error: ‘BZ2_bzReadClose’ was not declared in this scope
helpers/FileCompression.cpp:82: error: ‘BZ2_bzReadClose’ was not declared in this scope
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
./MotoGame.h:101: warning: ‘class vapp::MotoGameHooks’ has virtual functions but non-virtual destructor
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
VDrawOpenGL.cpp: In member function ‘virtual void vapp::DrawLibOpenGL::startDraw(vapp::DrawMode)’:
VDrawOpenGL.cpp:360: warning: enumeration value ‘DRAW_MODE_NONE’ not handled in switch
VDrawOpenGL.cpp: In member function ‘virtual void vapp::DrawLibOpenGL::setBlendMode(vapp::BlendMode)’:
VDrawOpenGL.cpp:416: warning: converting to non-pointer type ‘int’ from NULL
VDrawOpenGL.cpp:416: warning: NULL used in arithmetic
PolyDraw.h:4: error: syntax error before ‘vapp’
PolyDraw.h:4: error: syntax error before ‘{’ token
PolyDraw.h:12: error: syntax error before ‘}’ token
PolyDraw.h:15: error: syntax error before ‘*’ token
PolyDraw.h:15: warning: type defaults to ‘int’ in declaration of ‘PolyDraw’
PolyDraw.h:15: warning: data definition has no type or storage class
PolyDraw.h:19: error: syntax error before ‘*’ token
PolyDraw.h:21: error: syntax error before ‘SDL_Surface’
PolyDraw.h:23: error: syntax error before ‘:’ token
PolyDraw.h:26: warning: type defaults to ‘int’ in declaration of ‘m_pLeftEdge’
PolyDraw.h:26: warning: type defaults to ‘int’ in declaration of ‘m_pRightEdge’
PolyDraw.h:26: warning: data definition has no type or storage class
PolyDraw.h:30: error: syntax error before ‘EdgeValue’
PolyDraw.h:33: error: syntax error before ‘EdgeValue’
PolyDraw.h:37: error: syntax error before ‘}’ token
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
./MotoGame.h:101: warning: ‘class vapp::MotoGameHooks’ has virtual functions but non-virtual destructor
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:103: error: ‘::calloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:106: error: ‘::free’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: ‘::realloc’ has not been declared
VXml.cpp: In static member function ‘static std::string vapp::XML::str2xmlstr(std::string)’:
VXml.cpp:82: warning: comparison between signed and unsigned integer expressions
make: *** [Xmoto.elf] Error 1
I know that those BZ2 errors are because I don't have bz2 libriary for psp(do you know if there's one?It's not on svn),but I completely don't understand those about "malloc","free","call of overloaded ‘strcasecmp(char*&, const char [6])’ is ambiguous" and other C related functions.Could you take a look at it?Just in case I've already uploaded my project here: http://rapidshare.com/files/33133005/src.zip
Thanks in advance.