Opened 15 years ago

Closed 15 years ago

Last modified 5 years ago

#4001 closed defect (fixed)

PSP: Trunk doesn't compile

Reported by: SF/linuxdonald Owned by: joostp
Priority: normal Component: Port: PSP
Version: Keywords: build
Cc: Game:


PSP SVN Version 34826 don´t compile for me:

mkdir -p ./.deps psp-g++ -Wp,-MMD,"./.deps/osys_psp.d",-MQ,"osys_psp.o",-MP -I../../.. -I. -I../../../engines/ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -Wall -D__PSP__ -DNONSTANDARD_PORT -DUSE_ZLIB -Wno-multichar `/usr/local/pspdev/psp/sdk/../bin/sdl-config --cflags` -DUSE_MAD -DUSE_VORBIS -DUSE_TREMOR -fno-exceptions -fno-rtti -DENABLE_SCUMM=STATIC_PLUGIN -DENABLE_SCUMM_7_8 -DENABLE_AGI=STATIC_PLUGIN -DENABLE_AGOS=STATIC_PLUGIN -DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LURE=STATIC_PLUGIN -DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN -DENABLE_SWORD2=STATIC_PLUGIN -DDISABLE_SCALERS -DDISABLE_HQ_SCALERS -c osys_psp.cpp -o osys_psp.o osys_psp.cpp: In member function 'virtual void OSystem_PSP::initBackend()': osys_psp.cpp:103: error: 'class Common::SaveFileManager' has no member named 'getSavePath' osys_psp.cpp: In member function 'virtual bool OSystem_PSP::pollEvent(Common::Event&)': osys_psp.cpp:529: warning: suggest explicit braces to avoid ambiguous 'else' osys_psp.cpp:535: warning: suggest explicit braces to avoid ambiguous 'else' make: *** [osys_psp.o] Error 1

Ticket imported from: #2180613. Ticket imported from: bugs/4001.

Change History (7)

comment:1 by fingolfin, 15 years ago

Keywords: build added
Owner: set to joostp
Summary: PSP Version don´t compilePSP: Trunk doesn't compile

comment:2 by fingolfin, 15 years ago

Joost, I fixed those ambiguity warnings and the code formatting in osys_psp.cpp a bit. Hope you don't mind.

As for the error: A temporary quick & dirty workaround would be to make getSavePath public. A better solution, which would help other ports to solve the same problem, would be to add a "mkdir" feature to FSNode. So that the default save manager can create the savedir, if missing, on all ports. One idea would be to just add a FSNode::mkdir() method, which may be called on nodes which refer to non-existing paths. Or, add a static FSNode FSNode::mkdir(String path); class method to FSNode, which attempts to create a FSNode for the given path, creating a dir in that spot, if there isn't one already, and returning a (possibly invalid, if mkdir failed) FSNode.

comment:3 by fingolfin, 15 years ago

Alternate idea: Apparently, we really only need mkdir() to create the savefolder, if missing. Thus an alternate approach would be to turn DefaultSaveFileManager::checkPath() virtual, to allow backends to overload it. I.e. in the default version, we just check whether the dir exists, else return an error. But for Unix, PSP, Windows, etc., we provide specialization by subclassing.

comment:4 by fingolfin, 15 years ago

Joost, I refacteored DefaultSaveFileManager as mentioned. So you could now subclass it, and in your new PSPSaveFileManager, just overload the checkPath method and move your mkdir calls there. Voila, problem solved.

comment:5 by joostp, 15 years ago

Resolution: fixed
Status: newclosed

comment:6 by joostp, 15 years ago

Thanks Max! PSPSaveFileManager is now implemented and the code in trunk is compiling again. Closing this report.

comment:7 by digitall, 5 years ago

Component: Port: PSP
Note: See TracTickets for help on using tickets.