QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

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; Links: OSLib , PSProgramming , C/C++ Discussion Thread , PSP Dev Forum Rules Ok, i seriously think that PSPUpdates needs ...

Reply
 
LinkBack Thread Tools
Old 01-26-2006, 10:31 PM   #1

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Post C/C++ Programming Help Thread

Links: OSLib, PSProgramming, C/C++ Discussion Thread, PSP Dev Forum Rules


Ok, i seriously think that PSPUpdates needs a Help Thread for the old fashion programming, not just for LUA becasue there are some devrs out there that need help too and sometimes the people at ps2dev.org are ***es and dont even looka tyour post and such so if this doesnt get stickied i dont mind, i just think a temperary help forum will also do some good ok for my question (just so you guyz know, im a 5 day old programmer in c/c++)

My code is complying perfectly with no errors or anything, and i was just wondering what the best ways to laod images are, an example would be
Code:
blitAlphaImageToScreen(0, 0, height, width, Image*, posX, posY);
that would be the best for blitting a backround correct? that is what i use and it works fine and all but when i try to blit anything over it or anything of the sort, it gets all flashy and now i cant even fix it my code is so messed up, my image (.png) loads and all, but it flashes really quick and after 5 seconds it turns black and freezes, so whats the best way to load an image (.png) for both backround and normal blitting?
__________________

Last edited by Moose; 08-30-2008 at 08:06 AM..
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-26-2006, 11:09 PM   #2

Developer
 
Join Date: Sep 2005
Posts: 159
Trader Feedback: 0
Default

http://www.scriptscribbler.com/psp/t...s/lesson04.htm
AkumaATR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-26-2006, 11:50 PM   #3
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,486
Trader Feedback: 0
Default

I encountered something similar to your error and it was because I was loading my .png's in the main loop by accident...you want to set up a function or something to load all your png's first, so it's not doing it over and over, then launch your main loop...if that's not the problem check where you are calling flipscreen(); because blitimage is the function to be using for drawing most if not all basic 2D graphics...
__________________
PSN: Shatterdome
Shatterdome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 07:54 AM   #4

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

ofcourse! i knew it, i did int main() { then while(1) {, ill test this out after s hool, thanks dude if this works (like it should) ill have a beta or alpha of kitty cannon about next friday or in a week basically, thanks again i know this will wokr! because it makes so much sense

loading te image in hte loop meaning it wiuld load the image like a abillion times the problem i have! ha anyway thanks again
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 10:39 AM   #5
 
Join Date: Sep 2005
Posts: 8
Trader Feedback: 0
Default Beginner

I welcome your idea of putting a c/c++ help topic in this forum.

I will take profit and ask a question: I have pretty basic knowledge of c++ and I love programming. I would appreciate if any of you could give me a hand and tell me how can I begin using my time and little knowledge to create a game (or something that looks like one), some tutorials for example.

Thanks for all.
miguel82 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 12:23 PM   #6
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,486
Trader Feedback: 0
Default

The tutorial Ubernoob posted is really good...but maybe goto lesson 1 goes on about how to setup cygwin and pspsdk...
__________________
PSN: Shatterdome
Shatterdome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 01:33 PM   #7
 
Yeldarb's Avatar
 
Join Date: Jul 2005
Posts: 984
Trader Feedback: 0
Default

Why one thread.. post each question in a new thread like we've been doing, it's easier to find stuff later and it's easier to find the answers rather than having them spanned across multiple pages. (look how hard it is to find stuff in the PSP Programming Tutorials thread).
__________________
[url=http://www.barbdwyer.com/footer.php][img]http://www.barbdwyer.com/8Ball.jpg[/img][/url]
[FONT=Verdana][SIZE=1]
[b]PSP Developer Resource Site:[/b] [url=http://www.psp-programming.com]PSP-Programming.com[/url]

[b]Other:[/b] [url=http://wake-boarding.org]Wakeboarding[/url], [url=http://water-skiing.org]Waterskiing[/url], [url=http://wake-surfing.org]Wake Surfing[/url], [url=http://www.guitarhero-4.com]Guitar Hero IV[/url][/SIZE][/FONT]
Yeldarb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 02:17 PM   #8
 
Join Date: Jul 2005
Posts: 139
Trader Feedback: 0
Default

If you want to write a program for the PSP using C/C++ that uses 2D graphics, listen closely. This is the best advice you will get, I gaurontee:

Use SDL to write your game.

There is a working port in the SVN. Once setup, writing code for it probably rivals LUA in terms of ease of use and portability. And the best part you ask? SDL is fully documented. Yes, complete easy to use tutorials exist for adding graphics, sound, user controlls (among other things). And these tutorials can be applied to PSP programming. And finally, Rinco, the porter of SDL, is allways eager to help with any technical issues you may encounter.

Garak
Garak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 04:43 PM   #9

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

ok thats cool ill try that, but when it ryed to install that, it messed up and wouldnt install something wiht the ogg libs or soemthing i dunno but im still gonna keep tryin to install SDL seeing as how you ca load .bmps in it
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 05:39 PM   #10

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Quote:
Originally Posted by SG57
Ok, i seriously think that PSPUpdates needs a Help Thread for the old fashion programming, not just for LUA becasue there are some devrs out there that need help too and sometimes the people at ps2dev.org are ***es and dont even looka tyour post and such so if this doesnt get stickied i dont mind, i just think a temperary help forum will also do some good ok for my question (just so you guyz know, im a 5 day old programmer in c/c++)

My code is complying perfectly with no errors or anything, and i was just wondering what the best ways to laod images are, an example would be
Code:
blitAlphaImageToScreen(0, 0, height, width, Image*, posX, posY);
that would be the best for blitting a backround correct? that is what i use and it works fine and all but when i try to blit anything over it or anything of the sort, it gets all flashy and now i cant even fix it my code is so messed up, my image (.png) loads and all, but it flashes really quick and after 5 seconds it turns black and freezes, so whats the best way to load an image (.png) for both backround and normal blitting?
First off at the begging of the file you need to include the graphics header file if you dont already have it. Then you need to define the inmage before you blit it to the screen. You also need the libs as stated before. Just suggestions since i cant see your whole code.
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 07:40 PM   #11

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Quote:
Originally Posted by Twenty 2
First off at the begging of the file you need to include the graphics header file if you dont already have it. Then you need to define the inmage before you blit it to the screen. You also need the libs as stated before. Just suggestions since i cant see your whole code.
no no ihave it all, i jsut removed it form the loop and it returned a large scrolling thing of white letters scrolling by really fast which looked like all the bytes or something inside the file now when totalaly restart, i get a black screen no blitting adn freezing but anyway heres my entire code so i can get this fixed!
Code:
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <pspctrl.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspgu.h>
#include <png.h>
#include <stdio.h>
#include "graphics.h" 
#define printf pspDebugScreenPrintf
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) 
PSP_MODULE_INFO("c/c++ kitty", 0, 1, 1);
int exit_callback(int arg1, int arg2, void *common) {
		  sceKernelExitGame();
		  return 0;
}
int CallbackThread(SceSize args, void *argp) {
		  int cbid;
		  cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
		  sceKernelRegisterExitCallback(cbid);
		  sceKernelSleepThreadCB();  
		  return 0;
}
int SetupCallbacks(void) {
		  int thid = 0;
		  thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
		  if(thid >= 0) {
					sceKernelStartThread(thid  , 0, 0);
		  }
		  return thid;
}
int main()//------------------------------------Start Main Loop
{
	pspDebugScreenInit();
	SetupCallbacks();
	initGraphics();
	char buffer[200];
	Image* manBG;
	sprintf(buffer, "data/menu/mainBG.png");
	manBG = loadImage(buffer);
while(1) { //-------------------------------Start 1st INNER Loop
	if (!manBG) {
	   printf("Image Failed to Load, Contact JordanSg57@gmail.com");
	} else {
			int x = 0;
			int y = 0;
			sceDisplayWaitVblankStart();
			while (x < 480) {
		 while (y < 272) {
			blitAlphaImageToScreen(0, 0, 480, 272, manBG, x, y);
			y+= 272;
			}
			x+= 480;
   y = 0;
  }
  flipScreen();
 }
} //---------------------------------------------------------------End 1st INNER Loop
sceKernelExitGame();
return 0;											   
}//---------------------------------------------------------------//End Main Loop
so ya image loading problems to the maximum! all my other programs work fine tho, i dunno whtast wrong
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 07:44 PM   #12
 
Join Date: Jan 2006
Posts: 4,288
Trader Feedback: 0
Default

I haven't gotten into imaging on the PSP yet, but just from code that I've looked at (Danzel's peldet, complicated!) wouldn't:
if (!manBG) {
printf("Im...

shouldn't that be:
if (manBG != loadImage (buffer)) {...

because doesn't ! mean just not, so it would be like 'not manBG', and it should be 'if manBG not equal to loadImage(buffer)
which it should be equal to, right? Or am I just too much of a noob that I don't even fully understand the usage of the exclamation point :sad:
__________________
[URL="http://www.newlilwayne.com"]www.NewLilWayne.com[/URL]

Last edited by soccerPMN; 05-06-2006 at 08:51 PM..
soccerPMN is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 07:51 PM   #13
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,486
Trader Feedback: 0
Default

hmm, looks like you set x and y to 0 and if i'm reading it correct they just get set to there max right away and that those while loops will end, then the loop continues...and you only set y back to 0, not x...

x += 480 is the same as x = x + 480... I think you meant to put x += 1, which will increment it by one...but if you want it to tile your picture you will want to go x += picwidth and y += piclength....

hope that helps...
__________________
PSN: Shatterdome
Shatterdome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 07:56 PM   #14
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,486
Trader Feedback: 0
Default

Quote:
Originally Posted by soccerPMN
I haven't gotten into imaging on the PSP yet, but just from code that I've looked at (Danzel's peldet, complicated!) wouldn't:
if (!manBG) {
printf("Im...

shouldn't that be:
if (manBG != loadImage (buffer)) {...

because doesn't ! mean just not, so it would be like 'not manBG', and it should be 'if manBG not equal to loadImage(buffer)
which it should be equal to, right? Or am I just too much of a noob that I don't even fully understand the usage of the exclamation point :sad:
No it's pretty standard error checking for images...but yeah what you said would work as well but it's more typing but you never know...as long as you know you have your image in the right directory, trying // the error checking out and see what happens...
__________________
PSN: Shatterdome
Shatterdome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 07:57 PM   #15

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

nvm, fixed it
__________________

Last edited by SG57; 01-27-2006 at 09:12 PM..
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 08:14 PM   #16

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

ok i finally got it to work with no flashing or anything after like anhour of restarting and checking the makefile, etc. this is the code that works, can anyone tell me what was wrong with the one before and this one?
Code:
int main()//------------------------------------Start Main Loop
{
	pspDebugScreenInit();
	SetupCallbacks();
	initGraphics();
	char buffer[200];
	Image* mainBG;
	sprintf(buffer, "data/main.PNG");
	mainBG = loadImage(buffer);
	while(1) { //-------------------------------Start 1st INNER Loop
	if (!mainBG) {
	 printf("Image Failed to Load, Contact JordanSg57@gmail.com");
	} else {
			int x = 0;
			int y = 0;
			sceDisplayWaitVblankStart();
			blitAlphaImageToScreen(0, 0, 480, 272, mainBG, x, y);
	 flipScreen();
}
} //---------------------------------------------------------------End 1st INNER Loop
sceKernelExitGame();
return 0;											 
}//---------------------------------------------------------------//End Main Loop
p.s. i left out hte loops in hte middle seeing as how i was desperate to get my image to load

EDIT: loading 2 images has got me half of the backround black blinking a little, and the entire cursor blitted perfectly, but when i use the analog (added a mouse/curosr movement with analog) , it shows hte trail of the mouse and it goes in its own direction like my psp is freezing once hte mouse goes off screen but i think i can fix it with making boundaries, so im guessing the screenfillrect function nis the answer seeing as how it refreshes the screen or soemthing like that, so what would it be called if i wnate dit to be black?
Code:
ScreenFillRect(RGB(0, 0, 0))
? just a guess
__________________

Last edited by SG57; 01-27-2006 at 09:12 PM..
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 10:44 PM   #17
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,486
Trader Feedback: 0
Default

Yeah, i've yet to completely figure it out...mainly it's understanding how it draws to the screen I guess...I'm having a problem in doing my animation in a game, in that it always keeps the previous image in the same spot...it's like the drawbuffer I guess it's called, that you draw to before fliping the screen is never cleared ? unless you do it manually ? it'd be cool if someone could clarify that...or is it always a blank slate you have to draw to, then flip.....doesn't seem to be...
__________________
PSN: Shatterdome
Shatterdome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-27-2006, 11:35 PM   #18

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

i know what you mean but in LUA when i was programming, all you had to do was screen:fillrect(0, 0, 0, 0, black) and it refreshes the screen black everytime soemthing moves or the vblank goes by it so if you blit an image over the black then it woudl fix it so im wondering how to call that function/line or even if it is called that in c/c++, guess we gotta wait for the more knowlegable devs to take a look in here...
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-28-2006, 03:52 PM   #19

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Shatter Dome i figured outhow to fix the trail thing, just blit the 2 images together and it wont do it, like for me, i have a backround and a cursor as my menu right, so i blitted my images seperatley in 2 different places in stead of just one here is an example
Code:
char buffer[200];
char buffer1[200];
Image* other;
Image* backround;
sprintf(buffer, "backround.PNG");
backround = loadImage(buffer);
sprintf(buffer1, "other.PNG");
other = loadImage(buffer1);
int main() {
while(1) {
if(!backround) {
	 printf("Image Load Failed");
	 } else {
			 int x = 0;
			 int y = 0;
			 sceDisplayWaitVblankStart();
			 blitAlphaImageToScreen(0, 0, 480, 272, backround, x, y);
			 flipScreen();
}
if(!other) {
	 printf("Image Load Failed dude);
	 } else {
			 int otherx = 240;
			 int othery = 136;
			 sceDisplayWaitVblankStart();
			 blitalphaImageToScreen(0, 0, 10, 16, other, otherx, othery);
			 flipScreen();
}
}
}
thats an example for getting that trail thing when you should do combine the blitting to get rid of it like this
Code:
 
char buffer[200];
char buffer1[200];
Image* other;
Image* backround;
sprintf(buffer, "backround.PNG");
backround = loadImage(buffer);
sprintf(buffer1, "other.PNG");
other = loadImage(buffer1);
int main() {
while(1) {
if(!backround) {
	 printf("Image Load Failed");
	 } else {
			 int x = 0;
			 int y = 0;
			 int otherx = 240;
			 int othery = 136;
			 sceDisplayWaitVblankStart();
			 blitAlphaImageToScreen(0, 0, 480, 272, backround, x, y);
			 blitAlphaImageToScreen(0, 0, 10, 16, other, otherx, othery);
			 flipScreen();
}
}
}
now thats the right one and what that second one would do would load 2 images from the directory of hte eboot, 1 named backround.png and the other other.png, with the backround.png having the dimensions 480 x 272 and the other.png having the dimensions 10 x 16 and blitting the backround first as the backround and blitting the other image/other.png right in the middle of the screen over the backround and if you were to add analog/d-pad support to move it then there wouldnt be any trail or anything, there also is no flashing via Alpha, so hope that helps someone or anyone really,

now for my question, how do i load a LUA script from a C/C++ eboot? or is there a complier to compli a LUA script into a c/c++ source file of somesort? because i made these credits in LUA nad i dont want to re writethem in LUa so is htere some luaplayer elf booter that i could use to call dofile("credits.lua); or soemthing of the sort? thanks if you can help
__________________

Last edited by SG57; 01-28-2006 at 04:07 PM..
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-29-2006, 12:26 AM   #20

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

anyone know what the code snippet is to EXIT out of the game without actually clicking, home/yes?
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-29-2006, 04:03 AM   #21
Mushroom Man
 
Psilocybeing's Avatar
 
Join Date: Sep 2005
Location: UK
Posts: 318
Trader Feedback: 0
Default

sceKernelExitGame(); I think.
__________________
[URL=http://www.othala.co.uk]Othala[/URL] [B]o[/B] [URL=http://www.entheogendefencefund.org.uk/]Save the shroom![/URL]

[CENTER][URL=http://www.othala.co.uk/travellerBlog][IMG]http://www.othala.co.uk/graphics/travBanner.png[/IMG][/URL][/CENTER]
Psilocybeing is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-29-2006, 11:36 AM   #22

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Quote:
Originally Posted by Psilocybeing
sceKernelExitGame(); I think.
so if i put
Code:
if(pad.Buttons & PSP_CTRL_CROSS) {
		sceKernelExitGame();
it would exit? i hope so ill test
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-29-2006, 12:54 PM   #23

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

no because you forgot a end bracket
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-29-2006, 01:19 PM   #24

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

lol you are such a critic lol you are everywhere! i was in a hurry so i for got the end bracket geeze lol

o and by thte way, it worked lol
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-30-2006, 02:35 PM   #25
 
chingwyn's Avatar
 
Join Date: Nov 2005
Posts: 57
Trader Feedback: 0
Default

sorry to get off topic but i was wondering how to change the makefile compile a c++ main instead of a c main
chingwyn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-30-2006, 02:38 PM   #26

OMFG
 
Slasher's Avatar
 
Join Date: Jul 2005
Location: Toronto
Posts: 2,816
Trader Feedback: 0
Default

its the same...as long as its .cpp(for c++) or .c(for c)
Slasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-30-2006, 03:01 PM   #27
 
chingwyn's Avatar
 
Join Date: Nov 2005
Posts: 57
Trader Feedback: 0
Default

oo aight thx but um still gettin a prob

im trying to compile the main.cpp in my file but when keep getting a:
No rule to make target 'main.o', needed by 'hello.elf'. stop

i made a main.cpp and removed the main.c and wat i put above is the error im gettin

Last edited by chingwyn; 01-30-2006 at 03:42 PM..
chingwyn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-30-2006, 03:55 PM   #28

OMFG
 
Slasher's Avatar
 
Join Date: Jul 2005
Location: Toronto
Posts: 2,816
Trader Feedback: 0
Default

show me what your makefile looks like...post the whole thing plz
Slasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-30-2006, 03:59 PM   #29
 
chingwyn's Avatar
 
Join Date: Nov 2005
Posts: 57
Trader Feedback: 0
Default

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
chingwyn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-30-2006, 05:00 PM   #30

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

tisk tisk...you dont need the file to be a .cpp for a simple image example program, it would have to consist of mainly all C/C++, or ellse you get that error, because when i was porting, they were in .c and i was getting that error and i cahgned them to there opposite (.cpp) and wallaa it wokred
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
c or c , c++ , c/c++ , code , coding , c_language , programming , psp , psp programming , thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 05:42 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us