printf not working with PSPLink

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Helius
Posts: 5
Joined: Tue Nov 07, 2006 6:03 pm
Location: Madrid, Spain
Contact:

printf not working with PSPLink

Post by Helius »

Hi!

I am new to PSP but not new to programming. I managed to get the PSPSDK integrated with Visual Studio and now I'm trying with PSPLink.

All works nice, I can run my game from pcterm but nothing is printed in the window (there are lots of printfs in the game).

I also checked if "printf" was already defined but no luck. I think I'm correctly using printf from stdio.h but nothing is printed at all.

Any ideas?? Thanks.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

use pspDebugScreenPrintf, it will be easier :)
User avatar
Helius
Posts: 5
Joined: Tue Nov 07, 2006 6:03 pm
Location: Madrid, Spain
Contact:

Post by Helius »

What I need is a way to print to the pcterm console.

Y tried cout also and nothing happens :(
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

Try fprintf to stdout or stderr
User avatar
Helius
Posts: 5
Joined: Tue Nov 07, 2006 6:03 pm
Location: Madrid, Spain
Contact:

Post by Helius »

fprintf to stderr do the trick.

Thanks!!
johnmph
Posts: 119
Joined: Sat Jul 23, 2005 11:48 pm

Post by johnmph »

printf or fprintf(stderr,... doesn't work when the project is compiled with -lstdc++, they print on the PSP screen like normal printf (because c++ redefines standard functions ?).

How print to pcterm console with lstdc++ linked ?
User avatar
Helius
Posts: 5
Joined: Tue Nov 07, 2006 6:03 pm
Location: Madrid, Spain
Contact:

Post by Helius »

fprintf(stderr,... with -lstdc++ is working fine to me.
Post Reply