Lots of funny errors on cygwin...

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Gen_EriK
Posts: 3
Joined: Thu Nov 09, 2006 3:14 am

Lots of funny errors on cygwin...

Post by Gen_EriK »

Code: Select all

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...
User avatar
ReKleSS
Posts: 73
Joined: Sat Jun 18, 2005 12:57 pm
Location: Melbourne, Australia

Post by ReKleSS »

You're doubling something up in both your main and decrypt files. Either declare them static or kill one of them.
Gen_EriK
Posts: 3
Joined: Thu Nov 09, 2006 3:14 am

Post by Gen_EriK »

Here is my error:

Code: Select all

$ 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: Select all

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 &#40;i=1; i<5; i++&#41;
            &#123;
              printf&#40;"."&#41;;
              sceKernelDelayThread&#40;1000*1000&#41;;
            &#125;
            printf&#40;"-----------------------------\n"&#41;;
            memset&#40;&param, 0, sizeof&#40;param&#41;&#41;;
            param.size = sizeof&#40;param&#41;;
            param.args = strlen&#40;vshmain&#41; + 1;
            param.key = "vsh";
            sceKernelLoadExec&#40;vshmain, &param&#41;;
          &#125;
          sceDisplayWaitVblankStart&#40;&#41;;
          flipScreen&#40;&#41;;
          &#125;
        &#125;
        &#125;
return 0;
&#125;

jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

you're missing a semi colon at the end of line 151 and did you include pspctrl.h?
Post Reply