Seite 311 von 340 ErsteErste ... 211 261 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 ... LetzteLetzte
Zeige Ergebnis 9.301 bis 9.330 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 Davee You need to setup your enviroment variables before you start installing. I don't understand that. Can you ...

  
  1. #9301
    QJ Gamer Green
    Points: 3.567, Level: 37
    Level completed: 45%, Points required for next Level: 83
    Overall activity: 0%

    Registriert seit
    May 2008
    Ort
    The Netherlands
    Beiträge
    330
    Points
    3.567
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Davee Beitrag anzeigen
    You need to setup your enviroment variables before you start installing.
    I don't understand that. Can you explain it?

    EDIT: Please don't tell me Cygwin and PSPtoolchain don't work on Vista, because I run Vista. Is Vista the problem?


    Geändert von malliet (12-10-2008 um 08:21 AM Uhr)

  2. #9302
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    cygwin runs perfectly fine on vista

    as for environment variables, see the toolchain readme
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  3. #9303
    QJ Gamer Green
    Points: 3.567, Level: 37
    Level completed: 45%, Points required for next Level: 83
    Overall activity: 0%

    Registriert seit
    May 2008
    Ort
    The Netherlands
    Beiträge
    330
    Points
    3.567
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    Oke. Thanks for the answer, I will try it out again;)

  4. #9304
    Art
    Art ist offline
    Bush Programmer
    Points: 60.149, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    3.658
    Points
    60.149
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Hi Guys,
    Looking for a simple example of collision detection in GU.
    (ie. pixel resolution collision detection between two objects or finding the colour of a pixel at given coordinates).
    Thanks, Art.
    Geändert von Art (12-12-2008 um 01:41 AM Uhr)

  5. #9305
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    It's 3.15, I'm tired and this code doesn't seem to be working.
    Code:
    for(fileCompare = 0; fileCompare < fileCount; fileCompare ++)
        {
    		sceIoDread(dirId, &dirent);
    		sprintf(musicFiles[fileCompare].filename, dirent.d_name);
    		musicFiles[fileCompare].ID = fileCompare;
    	}
    I'm reading the contents of ms0:/MUSIC/. fileCount is the amount of files in the folder. The musicFiles struct holds filename and ID, nothing else. It reads fine, without crashing, when I display the filenames that are stored afterwards, they all show up the same eg. all filenames are the same file. Help would be awesome, I'm gonna go sleep...

    Edit: Fixed. Stupid error on my behalf
    Geändert von Xsjado7 (12-12-2008 um 06:07 PM Uhr)

  6. #9306
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard "error: expected unqualified-id before 'asm'" when compiling

    Hi,

    this is the first time I try to compile a C++ program, before that I only did C (for 1.5 kernel), and now I have troubles; When I compile I get an error saying

    main.cpp (24) : error: expected unqualified-id before 'asm'
    Line 24 is PSP_MODULE_INFO("pspProje ct", PSP_MODULE_USER, 1, 1);

    before that I include a file "Renderer.h", if I don't the error does not occur. Renderer.h is pretty simple:

    Code:
    class Renderer {
    
    public:
    	void render_screen();
    	void flip_screen();
    
    	void remove_layer(int layer_id);
    	void flush_layers();
    }
    So I guess the error must be found somewhere else, but I have no idea where. Maybe in the Makefile?
    Spoiler for Makefile:
    TARGET = pspProject
    OBJS = main.o callback.o

    INCDIR =
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)

    LIBDIR =
    LDFLAGS =
    LIBS = -lstdc++

    EXTRA_TARGETS = EBOOT.PBP
    PSP_EBOOT_TITLE = psp Project

    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build.mak


    Thanks for all answers

    Luke

  7. #9307
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    you lack trailing semi colon to close the class off.
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  8. #9308
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    -_-

    too much java lately *dies*

    Thank you!

  9. #9309
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard lists on the PSP

    Ok, more noob-questions, sorry for that;

    I'm trying to create a simple list with the stl, but I get the error

    Renderer.h (12) : error: ISO C++ forbids declaration of 'list' with no type

    Code is simple:

    Code:
    #include <list>
    
    #include "GuiObject.h"
    
    class Renderer {
    
    private:
    	list<GuiObject> gui_objects;     // <= Line 12
    
    // other code
    
    };
    I can cut out the #include <list> and get the same messages, somehow this doesn't seem to be recognized.

    Sorry for noobing around

    Luke

  10. #9310
    QJ Gamer Blue
    Points: 3.795, Level: 38
    Level completed: 97%, Points required for next Level: 5
    Overall activity: 27,0%

    Registriert seit
    Jul 2007
    Beiträge
    296
    Points
    3.795
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    The STL type list is under the namespace std, so if you want to use it you can do one of the following things:

    Code:
    using namespace std;
    ...
    list<SomeType> myList;
    or
    Code:
    std::list<SomeType> myList;

  11. #9311
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    thx!

  12. #9312
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Suddenly I was wondering if,

    char *text;
    //malloc blah blah

    Are these both interchangeable?

    Can we use either of these?

    text[5];
    *(text+5) (or is Only this valid?)

  13. #9313
    Points: 2.561, Level: 30
    Level completed: 74%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    May 2008
    Beiträge
    46
    Points
    2.561
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr305 Beitrag anzeigen
    Suddenly I was wondering if,

    char *text;
    //malloc blah blah

    Are these both interchangeable?

    Can we use either of these?

    text[5];
    *(text+5) (or is Only this valid?)
    Yes both
    Code:
    text[5];
    and
    Code:
    *(text+5);
    will work.

    Of course, you could've just tested it.

  14. #9314
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspersanonymous Beitrag anzeigen
    Yes both
    Code:
    text[5];
    and
    Code:
    *(text+5);
    will work.

    Of course, you could've just tested it.
    I test everything; but wanted to confirm this basic thing :)

  15. #9315
    QJ Gamer Bronze
    Points: 5.594, Level: 48
    Level completed: 22%, Points required for next Level: 156
    Overall activity: 0%

    Registriert seit
    Aug 2008
    Ort
    thugz mansion
    Beiträge
    875
    Points
    5.594
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    just a question but did the allegro engine get ported to the psp http://www.allegro.cc

    made game making in c alot more easy.
    Zitat Zitat von SuperBatXS
    I use my psp all the time in the plane. I was masturbating once while watching some lesbian videos when a fat lady beside me was sleeping and her really hot daughter next to her was getting ready for my dong to shove up her ding. Then, her daughter and I were about to go to the bathroom together but, the air hostess came to tell me i should stop right now. I swear this happened. I am never taking my psp to the plane again. Always got my iPod though...hehe. ;)

  16. #9316
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    To my knowledge it hasnt been ported. It should be portable though as it is a wrapper for SDL.

  17. #9317
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    allegro has nothing to do with sdl. it does not wrap sdl.

    my understanding is that it has already been ported by diedel (check ps2dev.org)
    see here http://diedel.blogcindario.com/
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  18. #9318
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    I've started compiling some stuff I've made recently, but I've come across some issues.

    First, when I tried compiling freetype it gives me an error with toolize, I've searched Google but can't find anything of use. I'm on Ubuntu Fiesty.

    Second, I've written a module and the exports, but I'm getting a warning "cannot find entry symbol module_start; defaulting to 0000...."

    Spoiler for Src, export, makefile:
    Code:
    #include <pspkernel.h>
    #include <stdio.h>
    #include <string.h>
    
    #include "depack.h"
    
    PSP_MODULE_INFO("PBP_DEPACK", 0x0, 1, 0);
    PSP_MAIN_THREAD_ATTR(0);
    
    void getOffsets(FILE* pbp, int position, long int* pointerStart, long int* pointerEnd)
    {
    	...
    }
    
    int module_start(SceSize args, void *argp)
    {
    	...
    }
    
    int module_stop(void)
    {
    	...
    }
    Code:
    # Define the exports for the prx
    PSP_BEGIN_EXPORTS
    
    # These four lines are mandatory (although you can add other functions like module_stop)
    # syslib is a psynonym for the single mandatory export.
    PSP_EXPORT_START(syslib, 0, 0x8000)
    PSP_EXPORT_FUNC_HASH(module_start)
    PSP_EXPORT_VAR_HASH(module_info)
    PSP_EXPORT_END
    
    PSP_EXPORT_START(PBP_DEPACK_EXP, 0, 0x4001)
    PSP_EXPORT_FUNC(getOffsets)
    PSP_EXPORT_END
    
    PSP_END_EXPORTS
    Code:
    TARGET = PBP_Depack
    OBJS = depack.o 
    
    INCDIR = 
    CFLAGS = -O2 -G0 -Wall
    CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
    ASFLAGS = $(CFLAGS)
    
    BUILD_PRX = 1
    PRX_EXPORTS = exports.exp
    
    USE_KERNEL_LIBC=0
    USE_KERNEL_LIBS=0
    
    LIBDIR =
    LDFLAGS = -mno-crt0 -nostartfiles
    LIBS = -lstdc++ -lpspkernel
    
    
    PSPSDK=$(shell psp-config --pspsdk-path)
    include $(PSPSDK)/lib/build_prx.mak


    Third - solved

    Finally, I today updated to 5.00 after being on 3.52 forever, I was wondering if there was still the development libraries to take advantage of M33 available like on the older cfws?

    Sorry for the long winded post, but I can't find any answers elsewhere.
    -Aura
    Geändert von Auraomega (12-15-2008 um 02:32 PM Uhr)
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  19. #9319
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    How do I find out wether or not a given filename (respectively path) is a folder or not? I found out for Linux there's S_ISDIR, but I can't figure out how to use it -_-. Does anyone have a good link or something?

  20. #9320
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    its called 'stat'.

    Code:
    int stat(char *path, struct stat *buf);
    then call S_ISDIR on the st_mode entry from the stat buffer...
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  21. #9321
    Points: 3.340, Level: 35
    Level completed: 94%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    31
    Points
    3.340
    Level
    35
    Downloads
    0
    Uploads
    0

    Standard

    Hi there,

    is there any way to downscale a png image while using graphics.h.
    found this function Image* imageThumbnail(Image* inImage) in another graphic.s c by flatmush. Did anybody ever used this function?


    Need to downscale some png images around 30%.


    Thanks in advance.

  22. #9322
    QJ Gamer Green
    Points: 6.366, Level: 52
    Level completed: 8%, Points required for next Level: 184
    Overall activity: 71,0%

    Registriert seit
    Apr 2008
    Ort
    in a hobbit hole
    Beiträge
    67
    Points
    6.366
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    :/
    Geändert von RupertAvery (12-16-2008 um 10:52 PM Uhr)

  23. #9323
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von _df_ Beitrag anzeigen
    its called 'stat'.

    Code:
    int stat(char *path, struct stat *buf);
    then call S_ISDIR on the st_mode entry from the stat buffer...
    Thanks a lot, _df_ ! :)

  24. #9324
    QJ Gamer Blue
    Points: 2.426, Level: 29
    Level completed: 84%, Points required for next Level: 24
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Aug 2008
    Beiträge
    26
    Points
    2.426
    Level
    29
    Downloads
    0
    Uploads
    0

    Standard

    I keep on getting errors with the SCEMP3 sample from the SDK. I keep on getting the loading music error (yes, the directory and everything is in the right spot). Does anyone have a working SCEMP3 sample (or something similar)

  25. #9325
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    If your getting an error at sceMp3Init( handle ) then your MP3 most likely has ID3 tag which sceMp3 cannot parse. You have to find your own way around it then pass the data back

  26. #9326
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Question Backgroung

    hi,
    im currently making a app for psp

    i need to know how to get the Mobo info,
    also i cant blit a background brhind text.

    Thx in advncd :Punk:

  27. #9327
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von slasher2661996 Beitrag anzeigen
    hi,
    im currently making a app for psp

    i need to know how to get the Mobo info,
    also i cant blit a background brhind text.

    Thx in advncd :Punk:
    http://www.psp-programming.com/tutorials/c/lesson04.htm

  28. #9328
    Developer
    Points: 12.154, Level: 72
    Level completed: 26%, Points required for next Level: 296
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Dubuque
    Beiträge
    423
    Points
    12.154
    Level
    72
    My Mood
    Lurking
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von MoAShaun Beitrag anzeigen
    I keep on getting errors with the SCEMP3 sample from the SDK. I keep on getting the loading music error (yes, the directory and everything is in the right spot). Does anyone have a working SCEMP3 sample (or something similar)
    Make sure you're using a later kernel... think the sdk sample only works with 3.71+.
    PSP Demo Videos (updated 11/29/08)
    MinerPSP Coder

  29. #9329
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Question yep

    yea thx guys i fixed the prob with the blit!! :Jump:

    i still need to get the MotherBoard info plz.

    Also i need to read a key from IdStorage
    Code:
    int ReadKey(int key, char *buffer) 
    { 
            int err; 
            u32 k1; 
    
            k1 = pspSdkSetK1(0); 
    
            memset(buffer, 0, 512); 
            err = sceIdStorageReadLeaf(key, buffer); 
    
            pspSdkSetK1(k1); 
    
            return err; 
    }
    but my compiler returns:
    Code:
    main.c:(.text+0x120): undefined reference to `sceIdStorageReadLeaf'
    plz help, thx in advncd :Punk:

    --EDIT--
    The code is also a prx because if im not mistaken this code has to be run in kernel mode right?
    Geändert von slasher101 (12-17-2008 um 11:10 PM Uhr) Grund: MORE INFO

  30. #9330
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Your missing a lib from you makefile. Not sure which one though

    Edit:
    Try - lpspidstorage


 

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:14 PM Uhr.

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