Advertising (This ad goes away for registered users. You can Login or Register)

Help compiling with Minimalist PSPSDK - "Undefined reference to..."

Most of the homebrews discussed in this forum can be downloaded here
Locked
wad11656
Posts: 9
Joined: Wed Feb 28, 2018 3:29 am

Help compiling with Minimalist PSPSDK - "Undefined reference to..."

Post by wad11656 »

Yoohoo! Any PSP devs still lurking on here?

I made a simple change to the GeMP 3.3 source files and now am trying to compile it with Minimalist PSPSDK

Code: Select all

make
.

However, I'm getting a few "undefined reference to" errors. I assume this means I'm missing some libraries in my SDK files(?) Particularly

Code: Select all

_fork
,

Code: Select all

_execve
,

Code: Select all

sceNetInetSetsockopt
,

Code: Select all

sceNetInetGetErrno
. How would I find and install these libraries? Or, if that's not the error, how do I fix my "undefined reference to" errors?

Code: Select all

C:\Users\User\Downloads\27565-GeMP v3.3 Final 2\GeMP v3.3 Final\GeMP Source code
>C:\pspsdk\bin\make.exe
psp-gcc -nostartfiles -Wl,-Ttext=0x08900000 startup.o GB/cpu.o GB/gb.o GB/lcd.o
GB/sgb.o GB/rom.o GB/mbc.o GB/apu.o GB/cheat.o main.o pg.o renderer.o menu.o fil
er.o sound.o saveload.o image.o gz.o syscall.o oggplayer.o music_gui.o utils.o m
p3.o lib/unziplib.a lib/libz.a lib/libmad.a lib/libvorbisidec.a lib/libpspaudio.
a lib/libpspaudiolib.a lib/libpng.a lib/libjpeg.a -lc -o out
c:/pspsdk/bin/../lib/gcc/psp/4.3.5/../../../../psp/lib\libc.a(isatty.o): In func
tion `isatty':
../../../../../../../newlib-1.18.0/newlib/libc/sys/psp/libcglue.c:627: multiple
definition of `isatty'
syscall.o:syscall.c:(.text+0x8): first defined here
GB/cheat.o: In function `hex2n':
cheat.c:(.text+0x0): relocation truncated to fit: R_MIPS_GPREL16 against `__ctyp
e_ptr__'
GB/cheat.o: In function `cheat_load':
cheat.c:(.text+0x5ec): relocation truncated to fit: R_MIPS_GPREL16 against `__ct
ype_ptr__'
c:/pspsdk/bin/../lib/gcc/psp/4.3.5/../../../../psp/lib\libc.a(lib_a-execr.o): In
 function `_fork_r':
../../../../../../newlib-1.18.0/newlib/libc/reent/execr.c:102: undefined referen
ce to `_fork'
c:/pspsdk/bin/../lib/gcc/psp/4.3.5/../../../../psp/lib\libc.a(lib_a-execr.o): In
 function `_execve_r':
../../../../../../newlib-1.18.0/newlib/libc/reent/execr.c:65: undefined referenc
e to `_execve'
c:/pspsdk/bin/../lib/gcc/psp/4.3.5/../../../../psp/lib\libc.a(setsockopt.o): In
function `setsockopt':
../../../../../../../newlib-1.18.0/newlib/libc/sys/psp/socket.c:293: undefined r
eference to `sceNetInetSetsockopt'
../../../../../../../newlib-1.18.0/newlib/libc/sys/psp/socket.c:296: undefined r
eference to `sceNetInetGetErrno'
c:/pspsdk/bin/../lib/gcc/psp/4.3.5/../../../../psp/lib\libc.a(setsockopt.o): In
function `getsockopt':
../../../../../../../newlib-1.18.0/newlib/libc/sys/psp/socket.c:167: undefined r
eference to `sceNetInetGetsockopt'
../../../../../../../newlib-1.18.0/newlib/libc/sys/psp/socket.c:170: undefined r
eference to `sceNetInetGetErrno'
C:\pspsdk\bin\make.exe: *** [out] Error 1

C:\Users\User\Downloads\27565-GeMP v3.3 Final 2\GeMP v3.3 Final\GeMP Source code
>C:\pspsdk\bin\make.exe
Makefile:19: *** commands commence before first target.  Stop.

C:\Users\User\Downloads\27565-GeMP v3.3 Final 2\GeMP v3.3 Final\GeMP Source code
>C:\pspsdk\bin\make.exe
psp-gcc -nostartfiles -Wl,-Ttext=0x08900000 startup.o GB/cpu.o GB/gb.o GB/lcd.o
GB/sgb.o GB/rom.o GB/mbc.o GB/apu.o GB/cheat.o main.o pg.o renderer.o menu.o fil
er.o sound.o saveload.o image.o gz.o syscall.o oggplayer.o music_gui.o utils.o m
p3.o lib/unziplib.a lib/libz.a lib/libmad.a lib/libvorbisidec.a lib/libpspaudio.
a lib/libpspaudiolib.a lib/libpng.a lib/libjpeg.a -lpspnet_inet -o out
psp-ld: cannot find -lpspnet_inet
C:\pspsdk\bin\make.exe: *** [out] Error 1
Advertising
Locked

Return to “Homebrews”