| View previous topic :: View next topic |
| Author |
Message |
Gen_EriK
Joined: 09 Nov 2006 Posts: 3
|
Posted: Sun Nov 12, 2006 8:45 am Post subject: Lots of funny errors on cygwin... |
|
|
| Code: | psp-gcc -I. -I/usr/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/psp/sdk/lib main.
o decrypt.o semaphore.o -lpspgu -lpng -lz -lm -lpsppower -lpspdebug -lpspdispla
y -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_
resolver -lpsputility -lpspuser -lpspkernel -o sd_decryptor.elf
decrypt.o:(.data+0x0): multiple definition of `key3'
main.o:(.data+0x0): first defined here
decrypt.o:(.data+0x90): multiple definition of `id3'
main.o:(.data+0x90): first defined here
decrypt.o:(.data+0x94): multiple definition of `key2'
main.o:(.data+0x94): first defined here
decrypt.o:(.data+0x124): multiple definition of `id2'
main.o:(.data+0x124): first defined here
decrypt.o:(.data+0x128): multiple definition of `key1'
main.o:(.data+0x128): first defined here
decrypt.o:(.data+0x1b8): multiple definition of `id1'
main.o:(.data+0x1b8): first defined here
decrypt.o:(.data+0x1bc): multiple definition of `key0'
main.o:(.data+0x1bc): first defined here
decrypt.o:(.bss+0x0): multiple definition of `id0'
main.o:(.bss+0x4): first defined here
decrypt.o: In function `sub_88056300':
decrypt.c:(.text+0x0): multiple definition of `sub_88056300'
main.o:main.c:(.text+0x0): first defined here
decrypt.o: In function `decrypt_file':
decrypt.c:(.text+0x44): multiple definition of `decrypt_file'
main.o:main.c:(.text+0x44): first defined here
collect2: ld returned 1 exit status
|
This is so annoying... |
|
| Back to top |
|
 |
ReKleSS

Joined: 18 Jun 2005 Posts: 73 Location: Melbourne, Australia
|
Posted: Sun Nov 12, 2006 9:50 am Post subject: |
|
|
| You're doubling something up in both your main and decrypt files. Either declare them static or kill one of them. |
|
| Back to top |
|
 |
Gen_EriK
Joined: 09 Nov 2006 Posts: 3
|
Posted: Mon Nov 13, 2006 8:14 am Post subject: |
|
|
Here is my error:
| Code: |
$ make
psp-gcc -I. -I/usr/psp/sdk/include -O2 -G0 -Wall -c -o main.o main.c
main.c : In function 'main':
main.c(144) : error: syntax error before numeric constant
main.c(151) : error: invalid lvalue in unary '&'
main.c(153) : error: syntax error before 'sceIoRemove'
main.c(158) : error: request for member 'Buttons' in something not a structure o
r union
main.c : At top level:
main.c(196) : error: syntax error before 'return'
|
and this isn't my whole code, but its my main function.
| Code: |
int main(void)
{
pspDebugScreenInit();
/* Enables HOME button */
// SetupCallbacks();
pspDebugInstallKprintfHandler(NULL);
SceCtrlData PSP;
int i = 1;
struct SceKernelLoadExecParam param;
if((sceKernelDevkitVersion() == 0x02050010) || (sceKernelDevkitVersion() == 0x02060010))
{
sceCtrlPeekBufferPositive(&PSP, 1)
/* Remove directory and SD files */
sceIoRemove("ms0:/decrypted_files/savedata_auto_dialog.prx");
sceIoRemove("ms0:/decrypted_files/savedata_plugin.prx");
sceIoRemove("ms0:/decrypted_files/savedata_utility.prx");
sceIoRemove("ms0:/decrypted_files");
if (PSP.Buttons && PSP_CTRL_CIRCLE)
{
for ( ;; )
{
/* Create directory */
while (check_file("ms0:/decrypted_files/") == 0)
{
printf("Creating dirs...");
sceIoMkdir("ms0:/decrypted_files", 0777);
sceKernelDelayThread(5*1000*1000);
printf("DONE");
break;
}
/* Decrypt SD files */
decrypt_files("flash0:/vsh/module/savedata_auto_dialog.prx", "ms0:/decrypted_files/savedata_auto_dialog.prx");
printf("DONE\n");
decrypt_files("flash0:/vsh/module/savedata_plugin.prx", "ms0:/decrypted_files/savedata_plugin.prx");
printf("DONE\n");
decrypt_files("flash0:/vsh/module/savedata_utility.prx", "ms0:/decrypted_files/savedata_utility.prx");
printf("DONE\n");
printf("Rebooting PSP in five seconds");
for (i=1; i<5; i++)
{
printf(".");
sceKernelDelayThread(1000*1000);
}
printf("-----------------------------\n");
memset(¶m, 0, sizeof(param));
param.size = sizeof(param);
param.args = strlen(vshmain) + 1;
param.key = "vsh";
sceKernelLoadExec(vshmain, ¶m);
}
sceDisplayWaitVblankStart();
flipScreen();
}
}
}
return 0;
}
|
|
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Wed Nov 15, 2006 10:26 am Post subject: |
|
|
| you're missing a semi colon at the end of line 151 and did you include pspctrl.h? |
|
| Back to top |
|
 |
|