Use this patch to address them$ make
cd libpsp2d && make
make[1]: Entering directory `/cygdrive/c/svn/cpplibs/libpsp2d'
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION
=150 -I.. -c -o framebuffer.o framebuffer.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION
=150 -I.. -c -o Exception.o Exception.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION
=150 -I.. -c -o Drawable.o Drawable.cpp
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION
=150 -I.. -c -o Screen.o Screen.cpp
Screen.cpp: In static member function 'static u32* PSP2D::Screen::getList()':
Screen.cpp:229: error: invalid conversion from 'unsigned int*' to 'u32*'
Screen.cpp: In member function 'void PSP2D::Screen::_saveToPNG(const std::string
&)':
Screen.cpp:296: error: 'malloc' was not declared in this scope
Screen.cpp:298: error: invalid conversion from 'int*' to 'int'
Screen.cpp:298: error: initializing argument 4 of 'int sceDisplayGetFrameBuf(v
oid**, int*, int*, int)'
Screen.cpp:336: error: 'free' was not declared in this scope
make[1]: *** [Screen.o] Error 1
make[1]: Leaving directory `/cygdrive/c/svn/cpplibs/libpsp2d'
make: *** [libs] Error 2
cpplibs.patch
Code: Select all
--- libpsp2d/Screen.cpp	2008-10-02 09:50:40.000000000 +0600
+++ libpsp2d/Screen.cpp.new	2008-10-22 13:10:56.515625000 +0600
@@ -37,6 +37,7 @@
 
 #include <pspgu.h>
 #include <pspdisplay.h>
+#include <malloc.h>
 
 #include <png.h>
 
@@ -226,7 +227,7 @@
 
 u32* Screen::getList()
 {
-    return list;
+    return (u32*) list;
 }
 
 void Screen::accept(DrawableVisitor *v)
@@ -261,7 +262,7 @@
     u16* vram16;
     int bufferwidth;
     int pixelformat;
-    int unknown;
+    //int unknown;
     int i, x, y;
     png_structp png_ptr;
     png_infop info_ptr;
@@ -295,7 +296,7 @@
     png_write_info(png_ptr, info_ptr);
     line = (u8*) malloc(SCREEN_WIDTH * 3);
     sceDisplayWaitVblankStart();  // if framebuf was set with PSP_DISPLAY_SETBUF_NEXTFRAME, wait until it is changed
-    sceDisplayGetFrameBuf((void**)&vram32, &bufferwidth, &pixelformat, &unknown);
+    sceDisplayGetFrameBuf((void**)&vram32, &bufferwidth, &pixelformat, PSP_DISPLAY_SETBUF_IMMEDIATE);
     vram16 = (u16*) vram32;
     for (y = 0; y < SCREEN_HEIGHT; y++) {
        for (i = 0, x = 0; x < SCREEN_WIDTH; x++) {
--- libpsp2d/Blitter.h	2008-10-02 09:50:40.000000000 +0600
+++ libpsp2d/Blitter.h.new	2008-10-22 13:12:02.609375000 +0600
@@ -37,6 +37,8 @@
 #ifndef _BLITTER_H
 #define _BLITTER_H
 
+#include <string.h>
+
 #include <libpsp2d/Screen.h>
 #include <libpsp2d/Image.h>
 
--- libpsp2d/Mask.cpp	2008-10-02 09:50:40.000000000 +0600
+++ libpsp2d/Mask.cpp.new	2008-10-22 13:13:20.484375000 +0600
@@ -36,6 +36,7 @@
 // $Id: Mask.cpp 1468 2005-11-20 12:18:29Z fraca7 $
 
 #include <malloc.h>
+#include <string.h>
 
 #include "Mask.h"
 
--- libpsp2d/Controller.h	2008-10-02 09:50:40.000000000 +0600
+++ libpsp2d/Controller.h.new	2008-10-22 13:47:53.781250000 +0600
@@ -38,6 +38,7 @@
 #define _CONTROLLER_H
 
 #include <pspctrl.h>
+#include <string.h>
 
 namespace PSP2D
 {
--- samples/hello/Makefile	2008-10-02 09:50:50.000000000 +0600
+++ samples/hello/Makefile.new	2008-10-22 13:47:25.437500000 +0600
@@ -8,7 +8,7 @@
 
 LIBDIR =
 LDFLAGS =
-LIBS = -lpspsnd -lpsp2d -lmikmod -lmmio -lpspaudiolib -lpspaudio -lpspgu -lpng -lz -lm -lstdc++
+LIBS = -lpspsnd -lpsp2d -lmikmod -lmmio -lpspaudiolib -lpspaudio -lpspgu -lpng -lz -lm -lstdc++ -ljpeg
 
 EXTRA_TARGETS = EBOOT.PBP
 PSP_EBOOT_TITLE = Hello Worldcat cpplibs.patch | patch -p0
make && make install