I then tried to link them into my elf. I am getting link errors about fprintf (usually in stdio), pow (usually in math), longjmp (not sure about this one), and strtod (string).
My link command looks like this:
Code: Select all
psp-gcc -o build/debug/game.elf -specs=c:/devkitPSP/psp/sdk/lib/prxspecs -Wl,-q,-Tc:/devkitPSP/psp/sdk/lib/linkfile.prx c:/devkitPSP/psp/sdk/lib/prxexports.o build/debug/GameApp.o build/debug/GraphicsObject.o build/debug/main.o build/debug/Pad.o build/debug/graphics.o -Lc:/devkitPSP/psp/sdk/lib -Llibs/libpng -Llibs/zlib -lstdc++ -lc -lpspgu -lpsprtc -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -lpng -lz
Code: Select all
libs/libpng\libpng.a(pngerror.o): In function `png_warning':
pngerror.c:(.text+0x1a0): undefined reference to `fprintf'
pngerror.c:(.text+0x218): undefined reference to `fprintf'
libs/libpng\libpng.a(pngerror.o): In function `png_error':
pngerror.c:(.text+0x304): undefined reference to `fprintf'
pngerror.c:(.text+0x310): undefined reference to `longjmp'
pngerror.c:(.text+0x37c): undefined reference to `fprintf'
pngerror.c:(.text+0x398): undefined reference to `fprintf'
libs/libpng\libpng.a(pngread.o): In function `png_create_read_struct_2':
pngread.c:(.text+0x1f20): undefined reference to `setjmp'
pngread.c:(.text+0x2054): undefined reference to `setjmp'
libs/libpng\libpng.a(pngrio.o): In function `png_default_read_data':
pngrio.c:(.text+0x8c): undefined reference to `fread'
libs/libpng\libpng.a(pngrtran.o): In function `png_build_gamma_table':
pngrtran.c:(.text+0x2c18): undefined reference to `pow'
pngrtran.c:(.text+0x2d08): undefined reference to `pow'
pngrtran.c:(.text+0x2e70): undefined reference to `pow'
pngrtran.c:(.text+0x2fd4): undefined reference to `pow'
pngrtran.c:(.text+0x30b0): undefined reference to `pow'
libs/libpng\libpng.a(pngrtran.o):pngrtran.c:(.text+0x319c): more undefined references to `pow' follow
libs/libpng\libpng.a(pngrutil.o): In function `png_handle_sCAL':
pngrutil.c:(.text+0x2254): undefined reference to `strtod'
pngrutil.c:(.text+0x2298): undefined reference to `strtod'
libs/libpng\libpng.a(pngrutil.o): In function `png_handle_sRGB':
pngrutil.c:(.text+0x38c8): undefined reference to `fprintf'
libs/libpng\libpng.a(pngrutil.o): In function `png_handle_cHRM':
pngrutil.c:(.text+0x3e90): undefined reference to `fprintf'
pngrutil.c:(.text+0x3f00): undefined reference to `fprintf'
libs/libpng\libpng.a(pngrutil.o): In function `png_handle_gAMA':
pngrutil.c:(.text+0x430c): undefined reference to `fprintf'
libs/libpng\libpng.a(pngwrite.o): In function `png_create_write_struct_2':
pngwrite.c:(.text+0x1354): undefined reference to `setjmp'
pngwrite.c:(.text+0x1424): undefined reference to `setjmp'
libs/libpng\libpng.a(pngwrite.o): In function `png_convert_from_time_t':
pngwrite.c:(.text+0x1574): undefined reference to `gmtime'
libs/libpng\libpng.a(pngwutil.o): In function `png_write_cHRM_fixed':
pngwutil.c:(.text+0x2054): undefined reference to `fprintf'
libs/libpng\libpng.a(pngwutil.o): In function `png_write_cHRM':
pngwutil.c:(.text+0x2294): undefined reference to `fprintf'
collect2: ld returned 1 exit status
Thanks,
~S[/code]