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!

Problem converting text example in pspsdk from C to C++

This is a discussion on Problem converting text example in pspsdk from C to C++ within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I'm trying to convert the text example located in the pspsdk from C to C++ (/usr/local/pspdev/psp/sdk/samples/gu/text/). I was hoping to ...

Reply
 
LinkBack Thread Tools
Old 01-14-2007, 07:28 PM   #1
 
Join Date: Nov 2006
Posts: 48
Trader Feedback: 0
Default Problem converting text example in pspsdk from C to C++

I'm trying to convert the text example located in the pspsdk from C to C++ (/usr/local/pspdev/psp/sdk/samples/gu/text/). I was hoping to integrate it somewhat into one of my current C++ projects. The error is the following:

Code:
main.cpp: In function ‘void drawString(const char*, int, int, unsigned int, int)’:
main.cpp:106: error: invalid conversion from ‘void*’ to ‘drawString(const char*, int, int, unsigned int, int)::VERT*’
This error is no existent when compiling with psp-gcc. You can get this same error by renaming main.c from the example to main.cpp and using psp-g++ to compile it instead of psp-gcc. I've attached the files below as well if anyone cares to point me in the right direction, thanks.
Attached Files
File Type: zip text.zip‎ (8.6 KB, 3 views)
trevis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-15-2007, 05:31 AM   #2

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

try the following
Code:
VERT* v = static_cast<VERT*> (sceGuGetMemory(sizeof(VERT) * 2 * len) );
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
converting , problem , pspsdk , text

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 02:28 PM.



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