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 hallo007 check the source of dark alex downgraders tests there formats he flash0 -= Double Post =- Spoiler ...
-
12-28-2006, 09:02 PM #2431The Unique Developer

- Registriert seit
- Oct 2006
- Ort
- Canada
- Beiträge
- 1.059
- Points
- 7.101
- Level
- 55
- Downloads
- 0
- Uploads
- 0
:::::
Zitat von hallo007
Code:#include <stdio.h> #include <string.h> int main () { char str[] = "ms0:/google/music.mp3" if ( (strstr (str,"mp3")) != NULL ) printf("How Many Times Do I Have To Tell You Don't \n Choos MP3's idiot!\n"); else printf("Your All Good!\n"); }
Malloc.Us Network Administrator
Decryption of the Encrypted
You are the unseen, the unstoppable and in power of your code. The God of your software.
-
12-28-2006, 09:26 PM #2432QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Too bad im trying to format flash1 :P
Zitat von hallo007
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
12-29-2006, 12:08 AM #2433words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Devun - It's not possible at compiling time. Just use a seprate integer (or array) per variable...

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
12-29-2006, 02:46 AM #2434Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
how do you check the width and the height of an image??? (an unknow image selected by an user of the app ofcourse;))
-
12-29-2006, 09:55 AM #2435
Thanks...
Zitat von SG57
To find the width and height of an image.
Zitat von hallo007
After the image has been loaded use Image* ->imageWidth; and
Image* ->imageHeight;
replacing the Image* with the actual images name within the source!
-
12-29-2006, 01:01 PM #2436Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
wat is the reason that when i do sceKernelExitGame my psp crashes (with the sound of the umd drive) and three days ago the function did work and i didnt change that function:-s
-
12-29-2006, 01:33 PM #2437The Unique Developer

- Registriert seit
- Oct 2006
- Ort
- Canada
- Beiträge
- 1.059
- Points
- 7.101
- Level
- 55
- Downloads
- 0
- Uploads
- 0
IF your using SE SDK , use sceKernelExitVSHVSH();.
Zitat von hallo007
And Thank Any One Who helped you please :) . (not me :P ).Malloc.Us Network Administrator
Decryption of the Encrypted
You are the unseen, the unstoppable and in power of your code. The God of your software.
-
12-29-2006, 01:53 PM #2438Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
i am not using the SE SDK tnx devenu;)
-
12-29-2006, 03:41 PM #2439words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Well, I dunno what may be causing a crash upon exiting, a corrupt stack maybe? I dunno...

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
12-30-2006, 03:58 AM #2440Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
how do you load bmp images
while searching i found some header files , but i dindt understand it
-
12-30-2006, 01:58 PM #2441words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
I think it will benefit you to write your own BMP loading library... I, for one, have written multiple versions of BMP loaders for when I was using PSPGL and loading textures such as PCX, BMP, RAW, etc. I learned alot from it. But if your not looking to learn, google for a BMP image loader in C and port it to work with the PSP. Simplest way i see fit.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
12-31-2006, 06:03 PM #2442Developer

- Registriert seit
- Feb 2006
- Ort
- Norway
- Beiträge
- 384
- Points
- 5.359
- Level
- 47
- Downloads
- 0
- Uploads
- 0
Is it possible to add something to my makefile that makes cygwin automaticly run the code,
"rm main.o"
everytime I compile?
It's tiresome to have to delete main.o manually everytime I have made a modification to a different file than main.c.
-
12-31-2006, 08:50 PM #2443QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
GNU make should do that automatically for you as it will detect a code change in the dependency chain of files. If main source and any other files that main source #includes does not change, then that object file does not need to be recompiled.
Read up on how the compiler works: http://www.ibiblio.org/obp/thinkCS/c...ish/chap01.htm
-
12-31-2006, 09:32 PM #2444words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Honestly, I like to 'clean' my envirorment right after compiling, whether debug or releease version... This makes sure the current version of my code is being compiled, and leaves virtually, no room for error, if the compiler were to randomly mistake an edited source file as for not edited...

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
12-31-2006, 09:32 PM #2445Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
'make clean' will delete those files for you.

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
-
01-01-2007, 12:52 AM #2446words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
*wonders why he is ignored*
*and wonders why Insomniac can't see my impliation of 'make clean' from the quoted 'clean' in lsat post*
>:{
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
01-01-2007, 08:21 AM #2447Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Cryptic answers to questions aren't useful.

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
-
01-01-2007, 11:38 PM #2448likes kittens....awww....
- Registriert seit
- Sep 2006
- Ort
- Detroit
- Beiträge
- 628
- Points
- 6.975
- Level
- 55
- Downloads
- 0
- Uploads
- 0
OK I need to know how to install libogg!
I have done:
Now what should I do?Code:svn checkout svn://svn.ps2dev.org/psp/trunk/libogg
-
01-02-2007, 01:09 AM #2449words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Insomniac - Bite me... ;)
psp
- Sooner or later your going to need to think logically about problems for yourself... I can tell you right now, the folder you just downloaded, somewhere in it is a readme or more specifically 'README.PSP' that will tell you EXACTLY what library requirements it needs, as well as what to do to install the library... I know from experience libogg needs libvorbis and libtremor... Unless, Ive mixed up the 3 and libtremor needs libogg and libvorbis, or the other ways around...

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
01-02-2007, 12:34 PM #2450likes kittens....awww....
- Registriert seit
- Sep 2006
- Ort
- Detroit
- Beiträge
- 628
- Points
- 6.975
- Level
- 55
- Downloads
- 0
- Uploads
- 0
SG57, I have "cygwin1.dll" in "C:/cygwin/bin/cygwin1.dll" but still doesn't work
-
01-02-2007, 01:17 PM #2451QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Did you read README.PSP?
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
01-03-2007, 01:33 AM #2452Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Read the error message again. You have multiple versions of cygwin1.dll, remove those that are not in the path given.
Zitat von psphacker12.

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
-
01-03-2007, 03:08 AM #2453Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
when i add -lpspkernel to my makefile , my app just crashes , when i dont add it my app works but kernelloads (like scekernelexitgame) dont work

any sugestions?
-
01-03-2007, 05:23 AM #2454Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
If you're following the samples and have these lines in your makefile:
Then there is no need to add -lpspkernel as it will be already included.Code:PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak
It sounds as though your error is something else, post your code.
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
-
01-03-2007, 11:29 AM #2455
- Registriert seit
- Dec 2006
- Beiträge
- 7
- Points
- 3.564
- Level
- 37
- Downloads
- 0
- Uploads
- 0
Hi all.
I have downloaded the source code that ahman released for VNC and decided to make a skin for it but the problem is I have no idea how to compile the code. I usually manage ok by searching forums and googling but after 4 days of getting it wrong I thought it was time to ask for a little help.
I'm not a total noob but this is something I have never done so I don't really know where to start.
I know I could probably find someone to compile it for me but I would rather expand my knowledge so that next time I can just get on and do it myself.
Many thanks to anyone willing to take the time to point me in the right direction.
-
01-03-2007, 01:28 PM #2456Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
check the tutorials on psp-programming.com
-
01-03-2007, 02:14 PM #2457
- Registriert seit
- Dec 2006
- Beiträge
- 7
- Points
- 3.564
- Level
- 37
- Downloads
- 0
- Uploads
- 0
Thanks :)
Zitat von hallo007
-
01-04-2007, 01:53 AM #2458Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
it is 1107 lines :/
Zitat von Insert_Witty_Name
but here is the makefile
Code:TARGET =noname OBJS = filebrowser/mp3player.o main.o filebrowser/file_browser.o graphics/graphics.o graphics/framebuffer.o CFLAGS = -O2 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBS = -lmad -lpspusb -lpspusbstor -lpsppower -lpspgu -lpng -lz -lm -lpspumd -lpspaudiolib -lpspaudio LDFLAGS = EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = nonameyetv0.2 PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak
-
01-04-2007, 05:32 PM #2459QJ Gamer Blue
- Registriert seit
- Jan 2006
- Ort
- CO
- Beiträge
- 150
- Points
- 8.686
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Hello all,
I was wondering if anyone knew why when I compile lesson4 I get this in the compiler log
whats all the unknown option stuff mean? it's not really that big of a deal (or maybe it is idk) because it compiles and runs. I'm just curious is all.Code:Compiler: Default compiler Executing make... make.exe -f "makefile" all unknown option -- aInvalid option '?' unknown option -- tInvalid option '?' unknown option -- hInvalid option '?' unknown option -- aInvalid option '?' unknown option -- tInvalid option '?' unknown option -- hInvalid option '?' unknown option -- aInvalid option '?' unknown option -- tInvalid option '?' unknown option -- hInvalid option '?' unknown option -- aInvalid option '?' unknown option -- tInvalid option '?' unknown option -- hInvalid option '?' psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o graphics.o graphics.c psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o framebuffer.o framebuffer.c psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/pspdev/psp/sdk/lib main.c graphics.o framebuffer.o -lpspgu -lpng -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf psp-fixup-imports hello.elf mksfo 'Image Example' PARAM.SFO psp-strip hello.elf -o hello_strip.elf pack-pbp EBOOT.PBP PARAM.SFO NULL \ NULL NULL NULL \ NULL hello_strip.elf NULL rm -f hello_strip.elf Execution terminated Compilation successful
-
01-04-2007, 05:56 PM #2460likes kittens....awww....
- Registriert seit
- Sep 2006
- Ort
- Detroit
- Beiträge
- 628
- Points
- 6.975
- Level
- 55
- Downloads
- 0
- Uploads
- 0
Can someone re-order my LIBS correctly pls?
Code:LIBS = -lpspctrl -lpspgu -lfreetype -lmad -lpspaudiolib -lpspaudio -lpsppower -lpspumd -lpng -lpsprtc -lpspusb -lpspusbstor -lz -lm -lvorbisidec


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum