Seite 30 von 340 ErsteErste ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 80 130 ... LetzteLetzte
Zeige Ergebnis 871 bis 900 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Zitat von Alexisonfire This is basically exactly what you're looking for. I have it in my own thread somewhere, but ...

  
  1. #871
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Alexisonfire
    This is basically exactly what you're looking for. I have it in my own thread somewhere, but I think the link is dead until I get a reliable server.
    http://www.sendspace.com/file/ufgrtm
    Is that Slasher's? Because I already have that. I got it now though. Thanks for your help.



  2. #872
    OMFG
    Points: 19.453, Level: 88
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Toronto
    Beiträge
    2.814
    Points
    19.453
    Level
    88
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Alexisonfire
    Previously Known As Slasher
    Have a look at my sig, it's me :)

  3. #873
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Durr. God I'm stupid. I know that you're slasher. I just got you confused with homer because he posted too.

  4. #874
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    when i was testing with loading backgrounds and cpu speed i get this error

    Code:
    //cpu speed changer
    
    /* cpu speed changer created by hallo007 (8 september 2006)and produced by rp productions
       thnx to psp-programming for their tutorials
    */
    
    #include <pspkernel.h> //alle codes voor de psp zodat schrijven gemmakelijker word
    #include <pspdebug.h> //nodig voor text op het scherm te printen
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <stdio.h>
    #include <psppower.h>
    
    
    
    PSP_MODULE_INFO("cpu speed changer", 0, 1, 1);
    /*
    niets belangerijk we vertellen de psp de naam van het programma maar je kan het weglaten het is niet echt de naam dat op het scherm zal verschijnen
    */
    #define printf pspDebugScreenPrintf
    /*
    we vertellen de compiller dat we screen gaan printen en om het gemmakelijk te maken zorgen we ervoor
    dat de compiller vanaf nu prontf kan lezen
    */
    /* Exit callback */
    int exit_callback(int arg1, int arg2, void *common) {
              sceKernelExitGame();
              return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
              int cbid;
    
              cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
              sceKernelRegisterExitCallback(cbid);
    
              sceKernelSleepThreadCB();
    
              return 0;
    }
    
    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void) {
              int thid = 0;
    
              thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
              if(thid >= 0) {
                        sceKernelStartThread(thid, 0, 0);
              }
    
              return thid;
    }
    //belangerijk altijd in code aanwezig zijn voor het sluiten enzovoort
    int main() { //start een functie
    pspDebugScreenInit();
    SetupCallbacks(); //zorg ervoor dat de functie start
    printf("rp productions"); //print text on screen
    Image* menu;
    menu = loadImage("menu.png")//laad afbeelding
    SceCtrlData pad;//zo kan je de controls gebruiken
     if(pad.Buttons & PSP_CTRL_UP) {//zeg wat de psp moet doen met het indrukken van up
           int main(void) {
              scePowerSetClockFrequency(333, 333, 166);//zet de cpu speed
              }
              printf("cpu speed = 333, 333, 166"); //print text on screen
              }
     if(pad.Buttons & PSP_CTRL_DOWN) {//zeg wat de psp moet doen met het indrukken van down
           int main(void) {
              scePowerSetClockFrequency(222, 222, 111);//zet de cpu speed
              }
              printf("cpu speed = 222, 222, 111"); //print text on screen
              }            
    sceKernelSleepThread(); // dit zorgt ervoor dat de psp een pause neemt waardoor je je functie kan zien
    return 0; // het blift de functie  herhalen herhalen
    }
    /*
    nu zeggen we dat de functie gedaan is en kan de psp eventueel de volgende functies uitvoeren of beter gezegd de ram blift de functie niet herladen
    */
    
    //momenteel einde
    Geändert von hallo007 (09-13-2006 um 04:27 AM Uhr)

  5. #875
    QJ Gamer Blue
    Points: 3.941, Level: 39
    Level completed: 94%, Points required for next Level: 9
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    53
    Points
    3.941
    Level
    39
    Downloads
    0
    Uploads
    0

    Standard

    You just had the same error three days ago. I'm guessing the same fix will work a second time.

  6. #876
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    I told you before. Copy c:\cygwin\bin\cygwin1.dll to C:\windows\system32


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  7. #877
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    ow srry gays
    i uploaded the wrong imgae xD

    really srry
    i m uploading the real image now
    -= Double Post =-
    oke now is it the good picture i did check it ;)
    Geändert von hallo007 (09-13-2006 um 04:27 AM Uhr) Grund: Automerged Doublepost

  8. #878
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    ow srry gays
    i uploaded the wrong imgae xD
    Who're you calling gay?
    lol, j/k.

    Anyway, you haven't included the graphics lib nor psppad.h.


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  9. #879
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    oke thnx

    the problem is
    if i take an snapshot i open it with paint and save it
    but it saves always as naamloos (i dont changes the name
    but i got many with that name:d
    so i v got
    naamloos.gif
    naamloos.png
    ....

    lol

  10. #880
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    You do know you can copy text from the cygwin window right?
    Zitat Zitat von jsharrad
    Right click the title bar of your cygwin window

    scroll down to "Edit"

    when a menu pops up click on "Mark"

    This will allow you to highlight anything within the cygwin window by holding down the left mouse button and dragging over the text

    After highlighting what you want to copy just release the left mouse button and right click.


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  11. #881
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    //image viewer
    
    /* image viewer created by hallo007 (8 september 2006)and produced by rp productions
       thnx to psp-programming for their tutorials
    */
    
    #include <pspkernel.h> //alle codes voor de psp zodat schrijven gemmakelijker word
    #include <pspdebug.h> //nodig voor text op het scherm te printen
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <stdio.h>
    #include <psppower.h>
    #include <pspctrl.h>
    #include <pspgu.h>
    #include <png.h>
    
    
    
    #include "graphics.h"
    
    
    PSP_MODULE_INFO("image viewer", 0, 1, 1);
    /*
    niets belangerijk we vertellen de psp de naam van het programma maar je kan het weglaten het is niet echt de naam dat op het scherm zal verschijnen
    */
    #define printf pspDebugScreenPrintf
    /*
    we vertellen de compiller dat we screen gaan printen en om het gemmakelijk te maken zorgen we ervoor
    dat de compiller vanaf nu prontf kan lezen
    */
    /* Exit callback */
    int exit_callback(int arg1, int arg2, void *common) {
              sceKernelExitGame();
              return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
              int cbid;
    
              cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
              sceKernelRegisterExitCallback(cbid);
    
              sceKernelSleepThreadCB();
    
              return 0;
    }
    
    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void) {
              int thid = 0;
    
              thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
              if(thid >= 0) {
                        sceKernelStartThread(thid, 0, 0);
              }
    
              return thid;
    }
    //belangerijk altijd in code aanwezig zijn voor het sluiten enzovoort
    int main() { //start een functie
    pspDebugScreenInit();
    SetupCallbacks(); //zorg ervoor dat de functie start
    printf("rp productions"); //print text on screen
    Image* menu;
    menu = loadImage("menu.png")//laad afbeelding
    SceCtrlData pad;//zo kan je de controls gebruiken
     if(pad.Buttons & PSP_CTRL_UP) {//zeg wat de psp moet doen met het indrukken van up
           int main(void) {
              scePowerSetClockFrequency(333, 333, 166);//zet de cpu speed
              }
              printf("cpu speed = 333, 333, 166"); //print text on screen
              }
     if(pad.Buttons & PSP_CTRL_DOWN) {//zeg wat de psp moet doen met het indrukken van down
           int main(void) {
              scePowerSetClockFrequency(222, 222, 111);//zet de cpu speed
              }
              printf("cpu speed = 222, 222, 111"); //print text on screen
              }            
    sceKernelSleepThread(); // dit zorgt ervoor dat de psp een pause neemt waardoor je je functie kan zien
    return 0; // het blift de functie  herhalen herhalen
    }
    /*
    nu zeggen we dat de functie gedaan is en kan de psp eventueel de volgende functies uitvoeren of beter gezegd de ram blift de functie niet herladen
    */
    
    //momenteel einde
    still the same problems
    -= Double Post =-
    Zitat Zitat von homer
    You do know you can copy text from the cygwin window right?
    no i dindt now it thnx
    -= Double Post =-
    problems:


    Roel [email protected] ~
    $ cd projects/bet

    Roel [email protected] ~/projects/bet
    $ make
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o mai
    n.c
    main.c:19:22: error: graphics.h: No such file or directory
    main.c: In function 'main':
    main.c:65: error: 'Image' undeclared (first use in this function)
    main.c:65: error: (Each undeclared identifier is reported only once
    main.c:65: error: for each function it appears in.)
    main.c:65: error: 'menu' undeclared (first use in this function)
    main.c:66: warning: implicit declaration of function 'loadImage'
    main.c:67: error: syntax error before 'SceCtrlData'
    main.c:68: error: 'pad' undeclared (first use in this function)
    main.c:69: warning: 'main' is normally a non-static function
    main.c:75: warning: 'main' is normally a non-static function
    make: *** [main.o] Error 1
    -= Double Post =-
    and dont forget still a dummie ad c/c++
    Geändert von hallo007 (09-13-2006 um 04:51 AM Uhr) Grund: Automerged Doublepost

  12. #882
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    You never included psppad.h, and did you add graphics.c and framebuffer.c to your OBJS in your makefile?


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  13. #883
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    o now forgotten , i m a dumbass ;)

    thnx
    -= Double Post =-
    still problems this is my makefile
    Code:
    TARGET = hello
    OBJS = main.o graphics.o framebuffer.o
    
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    LIBDIR =
    LIBS = -lpspgu -lpng -lz -lm
    LDFLAGS =
    
    EXTRA_TARGETS = EBOOT.PBP
    PSP_EBOOT_TITLE = Image Example
    
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak
    and the main.c
    Code:
    //image viewer
    
    /* image viewer created by hallo007 (8 september 2006)and produced by rp productions
       thnx to psp-programming for their tutorials
    */
    
    #include <pspkernel.h> //alle codes voor de psp zodat schrijven gemmakelijker word
    #include <pspdebug.h> //nodig voor text op het scherm te printen
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <stdio.h>
    #include <psppower.h>
    #include <pspctrl.h>
    #include <pspgu.h>
    #include <png.h>
    
    #include <psppad.h>
    
    
    
    #include "graphics.h"
    
    
    PSP_MODULE_INFO("image viewer", 0, 1, 1);
    /*
    niets belangerijk we vertellen de psp de naam van het programma maar je kan het weglaten het is niet echt de naam dat op het scherm zal verschijnen
    */
    #define printf pspDebugScreenPrintf
    /*
    we vertellen de compiller dat we screen gaan printen en om het gemmakelijk te maken zorgen we ervoor
    dat de compiller vanaf nu prontf kan lezen
    */
    /* Exit callback */
    int exit_callback(int arg1, int arg2, void *common) {
              sceKernelExitGame();
              return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
              int cbid;
    
              cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
              sceKernelRegisterExitCallback(cbid);
    
              sceKernelSleepThreadCB();
    
              return 0;
    }
    
    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void) {
              int thid = 0;
    
              thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
              if(thid >= 0) {
                        sceKernelStartThread(thid, 0, 0);
              }
    
              return thid;
    }
    //belangerijk altijd in code aanwezig zijn voor het sluiten enzovoort
    int main() { //start een functie
    pspDebugScreenInit();
    SetupCallbacks(); //zorg ervoor dat de functie start
    printf("rp productions"); //print text on screen
    Image* menu;
    menu = loadImage("menu.png")//laad afbeelding
    SceCtrlData pad;//zo kan je de controls gebruiken
     if(pad.Buttons & PSP_CTRL_UP) {//zeg wat de psp moet doen met het indrukken van up
           int main(void) {
              scePowerSetClockFrequency(333, 333, 166);//zet de cpu speed
              }
              printf("cpu speed = 333, 333, 166"); //print text on screen
              }
     if(pad.Buttons & PSP_CTRL_DOWN) {//zeg wat de psp moet doen met het indrukken van down
           int main(void) {
              scePowerSetClockFrequency(222, 222, 111);//zet de cpu speed
              }
              printf("cpu speed = 222, 222, 111"); //print text on screen
              }            
    sceKernelSleepThread(); // dit zorgt ervoor dat de psp een pause neemt waardoor je je functie kan zien
    return 0; // het blift de functie  herhalen herhalen
    }
    /*
    nu zeggen we dat de functie gedaan is en kan de psp eventueel de volgende functies uitvoeren of beter gezegd de ram blift de functie niet herladen
    */
    
    //momenteel einde
    -= Double Post =-
    do somone see it in the code
    because i mixed some tutorials
    -= Double Post =-
    no one????:s:s
    Geändert von hallo007 (09-13-2006 um 06:41 AM Uhr) Grund: Automerged Doublepost

  14. #884
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    question:

    im using OSlib, and i want to print a variable (integer) to the screen. i dont get how. i tried sprintf, dont work. i checks the docs, but i guess is missed, and i RLY dont wnat to read 1mb worth of text all over again.

    so my question is:

    how do you print variables to the screen in OSlib?
    --------------------------------------------------------------------------------------

  15. #885
    QJ Gamer Blue
    Points: 3.941, Level: 39
    Level completed: 94%, Points required for next Level: 9
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    53
    Points
    3.941
    Level
    39
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    how do you print variables to the screen in OSlib?
    Quick and dirty integer printing:
    Code:
    char temp[64];
    int i = 1;
    snprintf(temp, 63, "The value of i is %d", i);
    oslPrintf_xy(1, 5, temp);

  16. #886
    Developer
    Points: 14.378, Level: 77
    Level completed: 82%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Boston, MA
    Beiträge
    1.389
    Points
    14.378
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    I know this may seem a noobish question but...
    When you create an eboot, how do you use a C++ instead of a C file(as shown in a tutorial im veiwing), is it basically by putting a cpp file in the project folder instead of a c file?
    --Vaza

  17. #887
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Vaza
    I know this may seem a noobish question but...
    When you create an eboot, how do you use a C++ instead of a C file(as shown in a tutorial im veiwing), is it basically by putting a cpp file in the project folder instead of a c file?
    --Vaza
    Yup, the pspsdk automatically finds out whether it should use psp-gcc or psp-g++. So just change the extension to .cpp and it should work just fine.


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  18. #888
    Developer
    Points: 14.378, Level: 77
    Level completed: 82%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Boston, MA
    Beiträge
    1.389
    Points
    14.378
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von homer
    Yup, the pspsdk automatically finds out whether it should use psp-gcc or psp-g++. So just change the extension to .cpp and it should work just fine.
    Thanks, i'm just starting C++, im using a "Learn C++ in 21 Days" guide, im on day 3.

    http://newdata.box.sk/bx/c/
    If anyone wants to see the guide, thats it^^

  19. #889
    Developer
    Points: 4.872, Level: 44
    Level completed: 61%, Points required for next Level: 78
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Beiträge
    82
    Points
    4.872
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von СУББОТА
    Quick and dirty integer printing:
    Code:
    char temp[64];
    int i = 1;
    snprintf(temp, 63, "The value of i is %d", i);
    oslPrintf_xy(1, 5, temp);
    you can do this as simple as:

    Code:
    int i = 1;
    oslPrintf_xy(1, 5, "%d", i);
    however, i recommend:
    Code:
    int i=1;
    oslDebug("i = %d", i);

  20. #890
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    OK, I'm making my first, non-tutorial application. But I get an error when compiling it. I've already sorted through and eliminated most of the errors, but I still have this left. Anyone know how to fix it? What does 'undefined reference' mean?

    Code:
    $ make
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/
    pspdev/psp/sdk/lib   mp3player.o main.o -lmad -lpspaudiolib -lpspaudio -lpsppowe
    r -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet
    -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o mp3.elf
    main.o: In function `main':
    main.c:(.text+0xf0): undefined reference to `initGraphics'
    main.c:(.text+0x13c): undefined reference to `loadImage'
    main.c:(.text+0x164): undefined reference to `blitAlphaImageToScreen'
    collect2: ld returned 1 exit status
    make: *** [mp3.elf] Error 1

  21. #891
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ARza
    OK, I'm making my first, non-tutorial application. But I get an error when compiling it. I've already sorted through and eliminated most of the errors, but I still have this left. Anyone know how to fix it? What does 'undefined reference' mean?

    Code:
    $ make
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/
    pspdev/psp/sdk/lib   mp3player.o main.o -lmad -lpspaudiolib -lpspaudio -lpsppowe
    r -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet
    -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o mp3.elf
    main.o: In function `main':
    main.c:(.text+0xf0): undefined reference to `initGraphics'
    main.c:(.text+0x13c): undefined reference to `loadImage'
    main.c:(.text+0x164): undefined reference to `blitAlphaImageToScreen'
    collect2: ld returned 1 exit status
    make: *** [mp3.elf] Error 1
    let us see your code. im thinking that yu havent included a library.
    --------------------------------------------------------------------------------------

  22. #892
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Nevermind, I found the problem. It was in the Makefile.
    -= Double Post =-
    OK, now I have 2 more problems.
    1. I have pasted my background to the screen, but when I try to print something on the background, it just shows a black screen with text. No background shown.
    2. How do I position the text? Like X and Y coordinates?
    Geändert von ARza (09-16-2006 um 04:52 PM Uhr) Grund: Automerged Doublepost

  23. #893
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ARza
    Nevermind, I found the problem. It was in the Makefile.
    -= Double Post =-
    OK, now I have 2 more problems.
    1. I have pasted my background to the screen, but when I try to print something on the background, it just shows a black screen with text. No background shown.
    2. How do I position the text? Like X and Y coordinates?
    If you're using the graphics.c & graphics.h then the function you require is printTextScreen.

    Otherwise....

    If you are using pspDebugScreenPrintf then you get that black 'box' surrounding your text, it's a debug screen after all - nothing more.

    pspDebugScreenSetXY to position your text.

    (I'd recommend using printTextScreen if you are indeed using graphics.c & graphics.h)

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  24. #894
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Thanks. I found that out already, but I was too tired to post. BTW- AniMate is a GREAT game. You should have entered it into the PSPU contest. You could have won. Keep up the good work.
    -= Double Post =-
    OK, now I'm doing something a little different. I'm building a PRX. But I get this error:

    Code:
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall   -c -o main.o main.c
    make: *** No rule to make target `exports.o', needed by `hello.elf'.  Stop.
    Geändert von ARza (09-17-2006 um 05:30 AM Uhr) Grund: Automerged Doublepost

  25. #895
    AKA Homer
    Points: 12.596, Level: 73
    Level completed: 37%, Points required for next Level: 254
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Sweden
    Beiträge
    1.779
    Points
    12.596
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    You need an exports.exp file, I'd suggest you have a look at the sdk examples.


    Click Here if you want a Winamp Currently Playing Userbar like the one above.

  26. #896
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    EDIT: Nevermind, it's fixed.
    -= Double Post =-
    Sorry for asking for so much help, but now I'm getting this really long error. I've been trying to sort it for like 20 minutes, and I can't figure it out. Maybe someone else knows what's wrong.

    Code:
    [email protected] ~/projects/helloPRXsrc
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall   -c -o main.o main.c
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/ps
    pdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx
    main.o graphics.o framebuffer.o exports.o -lpspgu -lpng -lz -lm -lpspdebug -lpsp
    display -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lpspnet_apc
    tl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o): In
     function `png_warning':
    pngerror.c:(.text+0x14c): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x14c): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x1a8): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x1a8): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x1ac): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x1ac): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o): In
     function `png_error':
    pngerror.c:(.text+0x2a8): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x2a8): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x310): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x310): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o):png
    error.c:(.text+0x314): more undefined references to `_impure_ptr' follow
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o): In
     function `png_error':
    pngerror.c:(.text+0x314): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
     function `png_handle_gAMA':
    pngrutil.c:(.text+0xd08): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
     function `png_handle_cHRM':
    pngrutil.c:(.text+0x1470): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    pngrutil.c:(.text+0x14e0): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
     function `png_handle_sRGB':
    pngrutil.c:(.text+0x1790): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwrite.o): In
     function `png_convert_from_time_t':
    pngwrite.c:(.text+0xac4): undefined reference to `gmtime'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In
     function `png_write_cHRM':
    pngwutil.c:(.text+0x1120): undefined reference to `_impure_ptr'
    pngwutil.c:(.text+0x1120): additional relocation overflows omitted from the outp
    ut
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In
     function `png_write_cHRM_fixed':
    pngwutil.c:(.text+0x16dc): undefined reference to `_impure_ptr'
    collect2: ld returned 1 exit status
    make: *** [hello.elf] Error 1
    Geändert von ARza (09-17-2006 um 06:21 AM Uhr) Grund: Automerged Doublepost

  27. #897
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ARza
    EDIT: Nevermind, it's fixed.
    -= Double Post =-
    Sorry for asking for so much help, but now I'm getting this really long error. I've been trying to sort it for like 20 minutes, and I can't figure it out. Maybe someone else knows what's wrong.

    Code:
    [email protected] ~/projects/helloPRXsrc
    $ make
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall   -c -o main.o main.c
    psp-gcc -I/usr/local/pspdev/psp/sdk/include/libc -I. -I/usr/local/pspdev/psp/sdk
    /include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/ps
    pdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx
    main.o graphics.o framebuffer.o exports.o -lpspgu -lpng -lz -lm -lpspdebug -lpsp
    display -lpspge -lpspctrl -lpspsdk -lpsplibc -lpspnet -lpspnet_inet -lpspnet_apc
    tl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o): In
     function `png_warning':
    pngerror.c:(.text+0x14c): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x14c): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x1a8): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x1a8): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x1ac): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x1ac): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o): In
     function `png_error':
    pngerror.c:(.text+0x2a8): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x2a8): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    pngerror.c:(.text+0x310): undefined reference to `_impure_ptr'
    pngerror.c:(.text+0x310): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o):png
    error.c:(.text+0x314): more undefined references to `_impure_ptr' follow
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngerror.o): In
     function `png_error':
    pngerror.c:(.text+0x314): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
     function `png_handle_gAMA':
    pngrutil.c:(.text+0xd08): relocation truncated to fit: R_MIPS_GPREL16 against `_
    impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
     function `png_handle_cHRM':
    pngrutil.c:(.text+0x1470): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    pngrutil.c:(.text+0x14e0): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
     function `png_handle_sRGB':
    pngrutil.c:(.text+0x1790): relocation truncated to fit: R_MIPS_GPREL16 against `
    _impure_ptr'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwrite.o): In
     function `png_convert_from_time_t':
    pngwrite.c:(.text+0xac4): undefined reference to `gmtime'
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In
     function `png_write_cHRM':
    pngwutil.c:(.text+0x1120): undefined reference to `_impure_ptr'
    pngwutil.c:(.text+0x1120): additional relocation overflows omitted from the outp
    ut
    /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In
     function `png_write_cHRM_fixed':
    pngwutil.c:(.text+0x16dc): undefined reference to `_impure_ptr'
    collect2: ld returned 1 exit status
    make: *** [hello.elf] Error 1

    i 90% sure hthe problem is in your makefile. check if you have everything correc in there.
    -= Double Post =-
    anybody know a good md2 loader with animation capabalities?
    Geändert von Grimfate126 (09-17-2006 um 06:29 AM Uhr) Grund: Automerged Doublepost
    --------------------------------------------------------------------------------------

  28. #898
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    If you have either of these:

    Code:
    USE_PSPSDK_LIBC = 1
    USE_KERNEL_LIBS = 1
    In your makefile, take them out.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  29. #899
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Insomniac197
    If you have either of these:

    Code:
    USE_PSPSDK_LIBC = 1
    USE_KERNEL_LIBS = 1
    In your makefile, take them out.

    offtopic:

    can u ckeck ur pm's?
    --------------------------------------------------------------------------------------

  30. #900
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    EDIT: Nevermind


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:15 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .