Code: Select all
C:/pspsdk/psp/sdk/lib\libpsplibc.a(glue__sbrk.o): In function `_sbrk':
../../../../pspsdk/src/libc/libcglue.c:95: undefined reference to `sceKernelMaxF
reeMemSize'
Here is the makefile
Code: Select all
TARGET = mylib
OBJS = main.o
# Use the kernel's small inbuilt libc
USE_KERNEL_LIBC = 1
# Use only kernel libraries
USE_KERNEL_LIBS = 1
INCDIR =
CFLAGS = -O2 -G0 -Wall -fno-builtin-printf
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
PRX_EXPORTS = mylib.exp
STDLIBS = -losl -lpspgu -lpspge -lpspaudio -lpsppower -lpsplibc
#-losl -mp3 -lmikmod -lpng -lz
# STDLIBS += -lpspctrl -lpspumd -lpsprtc -lpsppower
# STDLIBS += -lpspgu -lpspaudiolib -lpspaudio
# STDLIBS += -lmikmod -lm -lc -lstdc++ -lpspmpeg -lpsprtc
# STDLIBS += -lpspaudiocodec -lpspatrac3 -lpspdisplay_driver
# STDLIBS += -lpspge -lpspsysmem_kernel -lpspkernel
LIBS = $(STDLIBS)
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
Code: Select all
#include <pspkernel.h>
#include <stdio.h>
#include <oslib/oslib.h>
#include <malloc.h>
PSP_MODULE_INFO("template", PSP_MODULE_KERNEL, 1, 1);
int main_thread(SceSize args, void *argp)
{
printf("Hello World\n");
return 0;
}
void startDrawing(void)
{
oslInit(0);
oslInitGfx(OSL_PF_8888,1);
oslDebug("prx loaded and osl inited from main");
while(!osl_quit)
{
oslStartDrawing();
oslDrawFillRect(0,0,100,100,RGB(255,0,0));
oslEndDrawing();
oslSyncFrame();
}
}
/* Entry point */
int module_start(SceSize args, void *argp)
{
int thid;
thid = sceKernelCreateThread("template", main_thread, 7, 0x800, 0, NULL);
if(thid >= 0)
{
sceKernelStartThread(thid, args, argp);
}
return 0;
}
/* Module stop entry */
int module_stop(SceSize args, void *argp)
{
return 0;
}