main.cpp:
Code: Select all
#include <pspkernel.h>
#include <stdio.h>
#include <stdlib.h>
#include <jpeglib.h>
int load_jpeg_file(FILE* f)
{
if(!f)
return 0;
jpeg_error_mgr jerr;
struct jpeg_decompress_struct cInfo;
cInfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cInfo);
jpeg_stdio_src(&cInfo, f);
return 1;
}
/* Define the module info section */
PSP_MODULE_INFO("Test", 0, 0, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
int main(int argc, char* argv[])
{
return 0;
}
Code: Select all
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150 -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 -lglut -lglu -lgl -lg -lpspvfpu -lpsprtc -lpsprtc_driver -lpspjpeg -ljpeg -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o test.elf
main.o: In function `load_jpeg_file(__sFILE*)':
main.cpp:(.text+0x2c): undefined reference to `jpeg_std_error(jpeg_error_mgr*)'
main.cpp:(.text+0x40): undefined reference to `jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned int)'
main.cpp:(.text+0x4c): undefined reference to `jpeg_stdio_src(jpeg_decompress_struct*, __sFILE*)'
collect2: ld returned 1 exit status
make: *** [test.elf] Error 1
Thanks.