C++ linking problems with new & delete operator, and oth
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
C++ linking problems with new & delete operator, and oth
When compiling my c++ program, I've gotten some strange errors.
main.o: In function `spr_file::destroy()':
main.cpp:(.text+0x44c): undefined reference to `operator delete(void*)'
main.o: In function `spr_file::create(unsigned int)':
main.cpp:(.text+0x474): undefined reference to `operator new[](unsigned int)'
main.o: In function `spr_file::load(char*)':
main.cpp:(.text+0x5ac): undefined reference to `__srget'
main.o: In function `game::destroy_level()':
main.cpp:(.text+0x914): undefined reference to `operator delete(void*)'
main.o: In function `game::show_split_in(int, char*)':
main.cpp:(.text+0x2088): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x2328): undefined reference to `operator delete(void*)'
main.o: In function `game::show_split_out(int, char*)':
main.cpp:(.text+0x24b8): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x2860): undefined reference to `operator delete(void*)'
main.o: In function `game::show_scroll_down(int, char*)':
main.cpp:(.text+0x2904): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x2a5c): undefined reference to `operator delete(void*)'
main.o: In function `game::create_level(unsigned int)':
main.cpp:(.text+0x4288): undefined reference to `operator new[](unsigned int)'
main.o: In function `game::load_high_score(char*)':
main.cpp:(.text+0x4490): undefined reference to `fscanf'
main.o: In function `game::play_boss_level()':
main.cpp:(.text+0x77a0): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x7898): undefined reference to `operator delete(void*)'
scn320.o: In function `scnpalette::~scnpalette()':
scn320.cpp:(.text+0x14): undefined reference to `operator delete(void*)'
scn320.o: In function `scn320::~scn320()':
scn320.cpp:(.text+0x34): undefined reference to `operator delete(void*)'
scn320.cpp:(.text+0x3c): undefined reference to `operator delete(void*)'
scn320.cpp:(.text+0x58): undefined reference to `operator delete(void*)'
scn320.o:scn320.cpp:(.text+0x60): more undefined references to `operator delete(
void*)' follow
scn320.o: In function `scnpalette::scnpalette()':
scn320.cpp:(.text+0x134): undefined reference to `operator new[](unsigned int)'
scn320.o: In function `scn320::scn320(int)':
scn320.cpp:(.text+0x1d0): undefined reference to `operator new[](unsigned int)'
scn320.cpp:(.text+0x1dc): undefined reference to `operator new[](unsigned int)'
scn320.cpp:(.text+0x1f8): undefined reference to `cos'
scn320.cpp:(.text+0x234): undefined reference to `sin'
I'm not sure if it helped, but I also tried editing build.mak and using the newlib instead via "USE_NEWLIB_LIBC = 1" but I got more errors
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(openr.o): In func
tion `_open_r':
../../../../../newlib/libc/reent/openr.c:59: undefined reference to `open'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In func
tion `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_times_r':
../../../../../newlib/libc/reent/timer.c:64: undefined reference to `times'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_gettimeofday_r':
../../../../../newlib/libc/reent/timer.c:108: undefined reference to `gettimeofd
ay'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In fun
ction `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In fun
ction `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
and this is when I used the newlib.
My questions is, are some functions not developed yet, such as the new and delete operator, and fgetc(), fscanf().
main.o: In function `spr_file::destroy()':
main.cpp:(.text+0x44c): undefined reference to `operator delete(void*)'
main.o: In function `spr_file::create(unsigned int)':
main.cpp:(.text+0x474): undefined reference to `operator new[](unsigned int)'
main.o: In function `spr_file::load(char*)':
main.cpp:(.text+0x5ac): undefined reference to `__srget'
main.o: In function `game::destroy_level()':
main.cpp:(.text+0x914): undefined reference to `operator delete(void*)'
main.o: In function `game::show_split_in(int, char*)':
main.cpp:(.text+0x2088): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x2328): undefined reference to `operator delete(void*)'
main.o: In function `game::show_split_out(int, char*)':
main.cpp:(.text+0x24b8): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x2860): undefined reference to `operator delete(void*)'
main.o: In function `game::show_scroll_down(int, char*)':
main.cpp:(.text+0x2904): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x2a5c): undefined reference to `operator delete(void*)'
main.o: In function `game::create_level(unsigned int)':
main.cpp:(.text+0x4288): undefined reference to `operator new[](unsigned int)'
main.o: In function `game::load_high_score(char*)':
main.cpp:(.text+0x4490): undefined reference to `fscanf'
main.o: In function `game::play_boss_level()':
main.cpp:(.text+0x77a0): undefined reference to `operator new[](unsigned int)'
main.cpp:(.text+0x7898): undefined reference to `operator delete(void*)'
scn320.o: In function `scnpalette::~scnpalette()':
scn320.cpp:(.text+0x14): undefined reference to `operator delete(void*)'
scn320.o: In function `scn320::~scn320()':
scn320.cpp:(.text+0x34): undefined reference to `operator delete(void*)'
scn320.cpp:(.text+0x3c): undefined reference to `operator delete(void*)'
scn320.cpp:(.text+0x58): undefined reference to `operator delete(void*)'
scn320.o:scn320.cpp:(.text+0x60): more undefined references to `operator delete(
void*)' follow
scn320.o: In function `scnpalette::scnpalette()':
scn320.cpp:(.text+0x134): undefined reference to `operator new[](unsigned int)'
scn320.o: In function `scn320::scn320(int)':
scn320.cpp:(.text+0x1d0): undefined reference to `operator new[](unsigned int)'
scn320.cpp:(.text+0x1dc): undefined reference to `operator new[](unsigned int)'
scn320.cpp:(.text+0x1f8): undefined reference to `cos'
scn320.cpp:(.text+0x234): undefined reference to `sin'
I'm not sure if it helped, but I also tried editing build.mak and using the newlib instead via "USE_NEWLIB_LIBC = 1" but I got more errors
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(openr.o): In func
tion `_open_r':
../../../../../newlib/libc/reent/openr.c:59: undefined reference to `open'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In func
tion `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_times_r':
../../../../../newlib/libc/reent/timer.c:64: undefined reference to `times'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_gettimeofday_r':
../../../../../newlib/libc/reent/timer.c:108: undefined reference to `gettimeofd
ay'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In fun
ction `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In fun
ction `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
and this is when I used the newlib.
My questions is, are some functions not developed yet, such as the new and delete operator, and fgetc(), fscanf().
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
Okay, I've edited the build.mak again and found out about how to link different libraries. so now I've linked most of the libraries including the kitchen sink. I'm still however coming up with the following errors.
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/
pspdev/psp/sdk/lib main.o scn320.o keyboard.o sfx.o -lpspdebug -lpsplibc -lpspkernel -lstdc++ -lm -lg -lpspglue -lc -lsupc++ -liberty -o sdktest.elf
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(sbrkr.o): In function `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(writer.o): In function `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(closer.o): In function `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
collect2: ld returned 1 exit status
make: *** [sdktest.elf] Error 1
Which libraries is suppose to contain the functions "lseek, read" etc...?
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/
pspdev/psp/sdk/lib main.o scn320.o keyboard.o sfx.o -lpspdebug -lpsplibc -lpspkernel -lstdc++ -lm -lg -lpspglue -lc -lsupc++ -liberty -o sdktest.elf
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(sbrkr.o): In function `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(writer.o): In function `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(closer.o): In function `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libg.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
collect2: ld returned 1 exit status
make: *** [sdktest.elf] Error 1
Which libraries is suppose to contain the functions "lseek, read" etc...?
The library order is important (see also this thread).
I think you should use -lstdc++ -lc -lpspglue.
Also, according to mrbrown, you should use libpsplibc, or libc + libpspglue; not both together.
Doing this, I only have 1 error (after updating with svn):
However, when I use -lpsplibc -lstdc++ -lc -lpspglue in this specific order (using both libpsplibc and libc, which I shouldn't do), even this last error disappears...
I would be glad if anyone can tell more about this...
I think you should use -lstdc++ -lc -lpspglue.
Also, according to mrbrown, you should use libpsplibc, or libc + libpspglue; not both together.
Doing this, I only have 1 error (after updating with svn):
Code: Select all
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libstdc++.a(pure.o):../../../../libstdc++-v3/libsupc++/pure.cc:54: undefined reference to `write'
collect2: ld returned 1 exit status
make: *** [.elf] Error 1
I would be glad if anyone can tell more about this...
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
I've tried -lstdc++ -lc -lpspglue and it actually resulted in more errors
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/
pspdev/psp/sdk/lib main.o scn320.o keyboard.o sfx.o -lpspdebug -lstdc++ -lm -
lc -lpspglue -lpspkernel -o sdktest.elf
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(openr.o): In func
tion `_open_r':
../../../../../newlib/libc/reent/openr.c:59: undefined reference to `open'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In func
tion `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(signalr.o): In fu
nction `_kill_r':
../../../../../newlib/libc/reent/signalr.c:61: undefined reference to `kill'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(signalr.o): In fu
nction `_getpid_r':
../../../../../newlib/libc/reent/signalr.c:96: undefined reference to `getpid'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_times_r':
../../../../../newlib/libc/reent/timer.c:64: undefined reference to `times'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_gettimeofday_r':
../../../../../newlib/libc/reent/timer.c:108: undefined reference to `gettimeofd
ay'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In fun
ction `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In fun
ction `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
collect2: ld returned 1 exit status
make: *** [sdktest.elf] Error 1
*screaming and tearing hair*
$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/
pspdev/psp/sdk/lib main.o scn320.o keyboard.o sfx.o -lpspdebug -lstdc++ -lm -
lc -lpspglue -lpspkernel -o sdktest.elf
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(openr.o): In func
tion `_open_r':
../../../../../newlib/libc/reent/openr.c:59: undefined reference to `open'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In func
tion `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(signalr.o): In fu
nction `_kill_r':
../../../../../newlib/libc/reent/signalr.c:61: undefined reference to `kill'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(signalr.o): In fu
nction `_getpid_r':
../../../../../newlib/libc/reent/signalr.c:96: undefined reference to `getpid'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_times_r':
../../../../../newlib/libc/reent/timer.c:64: undefined reference to `times'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(timer.o): In func
tion `_gettimeofday_r':
../../../../../newlib/libc/reent/timer.c:108: undefined reference to `gettimeofd
ay'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In fun
ction `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In fun
ction `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
collect2: ld returned 1 exit status
make: *** [sdktest.elf] Error 1
*screaming and tearing hair*
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
My current configuration is http://forums.ps2dev.org/viewtopic.php?t=2374
How do I update the toolchain? (such as what commands I should type in).
I'm a bit green on all this command line stuff.
How do I update the toolchain? (such as what commands I should type in).
I'm a bit green on all this command line stuff.
You can get new stuff from the svn repository.cooleyandy wrote:My current configuration is http://forums.ps2dev.org/viewtopic.php?t=2374
How do I update the toolchain? (such as what commands I should type in).
I'm a bit green on all this command line stuff.
But regarding the toolchain, I think the psptoolchain-20050625 is still valid; if you run toolchain.sh again, it will probably download new components -> can someone verify this, I only expect this because of this post of ooPo...
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
Tried it, same errors.th0mas wrote:you're using psp-gcc. Try using psp-g++?
I deleted the pspsdk folder, deleted the psp1.0+beta.tar.gz, and redownloaded the toolchain, and then followed the directions fromYou can get new stuff from the svn repository.
But regarding the toolchain, I think the psptoolchain-20050625 is still valid; if you run toolchain.sh again, it will probably download new components -> can someone verify this, I only expect this because of this post of ooPo...
http://forums.ps2dev.org/viewtopic.php?t=2374
again. Same errors. Let me be a bit more detailed in what I'm compiling.
I'm compiling a program using 'make' and the project has multiple files.
main.cpp
sfx.cpp
scn320.cpp
keyboard.cpp
I've edited the MakeFile to have
main.o sfx.o scn320.o keyboard.o
I've been porting an old game and all the old compilation errors are fixed. (i.e. char far, old compiler specific funcs) but I just can't seem to get the code compiled.
Anyone who have successfully compiled a C++ program that uses new, delete, please let me know what configuration you have used (makefile and build.mak) and what libraries you included and what order you put it in.
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
Okay, I've finally isolated the problem. It seems if I use the function getc() or fscanf(), the errors:
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In func
tion `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In fun
ction `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In fun
ction `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
collect2: ld returned 1 exit status
make: *** [sdktest.elf] Error 1
occurs. I've followed the other post from tommybear and got the new and delete operator working.
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(sbrkr.o): In func
tion `_sbrk_r':
../../../../../newlib/libc/reent/sbrkr.c:60: undefined reference to `sbrk'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(writer.o): In fun
ction `_write_r':
../../../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(closer.o): In fun
ction `_close_r':
../../../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(lseekr.o): In fun
ction `_lseek_r':
../../../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(readr.o): In func
tion `_read_r':
../../../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libc.a(fstatr.o): In fun
ction `_fstat_r':
../../../../../newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
collect2: ld returned 1 exit status
make: *** [sdktest.elf] Error 1
occurs. I've followed the other post from tommybear and got the new and delete operator working.
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am