Code: Select all
int SetupCallbacks();
/* Snippet of code, till main () added on March 20, 2006
If this flag is set to 1, the _init() function was called and all
global/static constructors have been called. */
static int init_was_called = 0;
__attribute__ ((constructor))
void loaderInit()
{
int kmode_is_available = (sceKernelDevkitVersion() < 0x02000010);
if (kmode_is_available) {
/* Do nefarious kernel stuff here */
}
init_was_called = 1;
}
extern void _init(void);
int main(int argc, char *argv[])
{
/* Fanjita's EBOOT loader can be configured to skip the call to _init().
Since we need _init() for C++, we check to see if _init() has been
called. If it hasn't we call it manually, after determining whether or
not we can access the kernel. */
if (!init_was_called) {
_init();
}
SetupCallbacks();
Naturally this resulted in:
Code: Select all
Panajev@Panajev /usr/local/pspdev/psp/sdk/samples/IGGS_PSP
$ make
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/main.o src/main.cpp
ccache psp-gcc -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -c -o
src/disablefpu.o src/disablefpu.S
bin2o -i ../gu/cube/logo.raw logo.o logo
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/point.o src/point.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/pmatrix.o src/pmatrix.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/PSP_Utils.o src/PSP_Utils.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/camera3d.o src/camera3d.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/Matrix_stack.o src/Matrix_stack.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/3dsloader.o src/3dsloader.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/ctextureP2.o src/ctextureP2.cpp
ccache psp-g++ -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -msingle-floa
t -funroll-loops -ffast-math -fsingle-precision-constant -fno-exceptions -fno-ex
ceptions -fno-rtti -c -o src/clipper3d.o src/clipper3d.cpp
ccache psp-gcc -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -c -o src/valloc.o src/valloc.c
ccache psp-gcc -I. -IC:/cygwin/usr/local/pspdev/psp/sdk/include -G0 -Wall -Os -m
single-float -funroll-loops -ffast-math -fsingle-precision-constant -fno-excepti
ons -L. -LC:/cygwin/usr/local/pspdev/psp/sdk/lib src/main.o src/disablefpu.o
logo.o src/point.o src/pmatrix.o src/PSP_Utils.o src/camera3d.o src/Matrix_stack
.o src/3dsloader.o src/ctextureP2.o src/clipper3d.o src/valloc.o -lpng -lz -lint
mdloader -lgeommath -lpspgu -lstdc++ -lm -lc -lpspdebug -lpspdisplay -lpspge -l
pspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lp
sputility -lpspuser -lpspkernel -o krondor.elf
src/main.o: In function `main':
main.cpp:(.text+0x124): undefined reference to `_init()'
collect2: ld returned 1 exit status
make: *** [krondor.elf] Error 1
Is there anything I am missing ? Do you need more data that I can provide to help me with this issue ?
Thanks anyways, I hope not to keep my application stuck in FW 1.50 land forever ;).