forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lots of funny errors on cygwin...

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Gen_EriK



Joined: 09 Nov 2006
Posts: 3

PostPosted: Sun Nov 12, 2006 8:45 am    Post subject: Lots of funny errors on cygwin... Reply with quote

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
View user's profile Send private message
ReKleSS



Joined: 18 Jun 2005
Posts: 73
Location: Melbourne, Australia

PostPosted: Sun Nov 12, 2006 9:50 am    Post subject: Reply with quote

You're doubling something up in both your main and decrypt files. Either declare them static or kill one of them.
Back to top
View user's profile Send private message
Gen_EriK



Joined: 09 Nov 2006
Posts: 3

PostPosted: Mon Nov 13, 2006 8:14 am    Post subject: Reply with quote

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(&param, 0, sizeof(param));
            param.size = sizeof(param);
            param.args = strlen(vshmain) + 1;
            param.key = "vsh";
            sceKernelLoadExec(vshmain, &param);
          }
          sceDisplayWaitVblankStart();
          flipScreen();
          }
        }
        }
return 0;
}

Back to top
View user's profile Send private message
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Wed Nov 15, 2006 10:26 am    Post subject: Reply with quote

you're missing a semi colon at the end of line 151 and did you include pspctrl.h?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group