Insert_witty_name wrote:
Is not the same as:
Yeah I had noticed this too, you can see the explanation in the header:
Code: Select all
/* Initialization of JPEG compression objects.
* jpeg_create_compress() and jpeg_create_decompress() are the exported
* names that applications should call. These expand to calls on
* jpeg_CreateCompress and jpeg_CreateDecompress with additional information
* passed for version mismatch checking.
* NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.
*/
#define jpeg_create_compress(cinfo) \
jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
(size_t) sizeof(struct jpeg_compress_struct))
#define jpeg_create_decompress(cinfo) \
jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
(size_t) sizeof(struct jpeg_decompress_struct))
jimparis, here is what a "psp-nm /usr/local/pspdev/psp/lib/libjpeg.a | grep -i create" gives me... not surprisingly, unfortunately:
bronsky@athlon2400:~$ psp-nm /usr/local/pspdev/psp/lib/libjpeg.a |grep -i create
00000000 T jpeg_CreateCompress
00000000 T jpeg_CreateDecompress
0000002c t create_colorindex
So nm can see the stuff, but not ld... really can't figure it out :(
I've also added some --verbose in the makefile, which gives the following output (nothing interesting in my opinion but maybe you'll see something...):
Code: Select all
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include --verbose -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include --verbose -O2 -G0 -Wall --verbose -fno-rtti -c -o main.o main.cpp
Using built-in specs.
Target: psp
Configured with: ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0
Thread model: single
gcc version 4.0.2 (PSPDEV 20051022)
/usr/local/pspdev/libexec/gcc/psp/4.0.2/cc1plus -quiet -v -v -v -I. -I/usr/local/pspdev/psp/sdk/include -I. -I/usr/local/pspdev/psp/sdk/include -DPSP=1 -D__psp__=1 -D_PSP=1 main.cpp -G0 -G0 -quiet -dumpbase main.cpp -auxbase-strip main.o -O2 -O2 -Wall -Wall -version -fno-rtti -o /tmp/cc55U6Ie.s
ignoring nonexistent directory "/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/sys-include"
ignoring duplicate directory "."
ignoring duplicate directory "/usr/local/pspdev/psp/sdk/include"
#include "..." search starts here:
#include <...> search starts here:
.
/usr/local/pspdev/psp/sdk/include
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/psp
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../include/c++/4.0.2/backward
/usr/local/pspdev/lib/gcc/psp/4.0.2/include
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/include
End of search list.
GNU C++ version 4.0.2 (PSPDEV 20051022) (psp)
compiled by GNU C version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5).
GGC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=96948
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/as -G0 -G0 -EL -O2 -no-mdebug -mabi=eabi -v -v -v -mno-pdr -o main.o /tmp/cc55U6Ie.s
GNU assembler version 2.16.1 (psp) using BFD version 2.16.1 (PSPDEV 20060116)
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include --verbose -O2 -G0 -Wall -L. -L/usr/local/pspdev/psp/sdk/lib --verbose main.o -ljpeg -lstdc++ -lpsprtc -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o Tetris.elf
Using built-in specs.
Target: psp
Configured with: ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c,c++ --with-newlib --enable-cxx-flags=-G0
Thread model: single
gcc version 4.0.2 (PSPDEV 20051022)
/usr/local/pspdev/libexec/gcc/psp/4.0.2/collect2 -EL -G0 -o Tetris.elf /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/crt0.o /usr/local/pspdev/lib/gcc/psp/4.0.2/crti.o /usr/local/pspdev/lib/gcc/psp/4.0.2/crtbegin.o -L. -L/usr/local/pspdev/psp/sdk/lib -L/usr/local/pspdev/lib/gcc/psp/4.0.2 -L/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib main.o -ljpeg -lstdc++ -lpsprtc -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -lgcc -lgcc /usr/local/pspdev/lib/gcc/psp/4.0.2/crtend.o /usr/local/pspdev/lib/gcc/psp/4.0.2/crtn.o
main.o: In function `main':
main.cpp:(.text+0x10): undefined reference to `jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned int)'
collect2: ld returned 1 exit status
make: *** [Tetris.elf] Error 1
Two things however:
- is it normal that this output mentions consecutively 2 different version of pspdev ? (PSPDEV 20051022 then PSPDEV 20060116 then PSPDEV 20051022 again)
- i supposed that when it says "ld returned 1" it actually means "psp-ld" ? is there any way to check that ? (but i suppose that if it was wrong i wouldn't have compiled all my previous programs...)
Thanks
Bronsky