forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error on Zorba's Adhoc example

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jo3_sum



Joined: 30 Jan 2008
Posts: 17

PostPosted: Fri Sep 19, 2008 10:38 am    Post subject: Error on Zorba's Adhoc example Reply with quote

I edited all the errors I originally got, but I can't slove this one. According to the psp docs this, should work, but my compiler says otherwise. Maybe my lib for this function is out of date; however, I updated my sdk using the 4.01 m33-2 sdk update.


1>ZBadhoc.cpp (699) : error: invalid conversion from 'void (*)(int, int, unsigned char*, int, char*)' to 'void (*)(int, int, unsigned char*, int, void*)'
1>ZBadhoc.cpp (699) : error: initializing argument 9 of 'int sceNetAdhocMatchingCreate(int, int, int, int, int, int, int, int, void (*)(int, int, unsigned char*, int, void*))'



Code:
1>------ Build started: Project: PSP Adhoc, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>psp-g++ -I. -I C:/pspdev/psp/sdk/include  -g -G0 -Wall -O3 -D_PSP_FW_VERSION=371 -fno-rtti -fno-exceptions -c -o ZBadhoc.o ZBadhoc.cpp
1>ZBadhoc.cpp: In member function 'void ZBadhoc::createMatching()':
1>ZBadhoc.cpp (699) : error: invalid conversion from 'void (*)(int, int, unsigned char*, int, char*)' to 'void (*)(int, int, unsigned char*, int, void*)'
1>ZBadhoc.cpp (699) : error:   initializing argument 9 of 'int sceNetAdhocMatchingCreate(int, int, int, int, int, int, int, int, void (*)(int, int, unsigned char*, int, void*))'
1>make: *** [ZBadhoc.o] Error 1
1>Build log was saved at "file://c:\Users\Joe\Desktop\misc\PSP Adhoc\PSP Adhoc\Debug\BuildLog.htm"
1>PSP Adhoc - 2 error(s), 0 warning(s)
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jo3_sum



Joined: 30 Jan 2008
Posts: 17

PostPosted: Fri Sep 19, 2008 11:00 am    Post subject: Reply with quote

Luckily, roe-ur-boat on MSN told me what was the problem. All I had to do was to change:

Code:
 
void matchingCB(int unk1, int event, unsigned char *macSource, int size, char *data)
{
...
}


to


Code:

void matchingCB(int unk1, int event, unsigned char *macSource, int size, void *data)
{
...
}
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
pspZorba



Joined: 22 Sep 2007
Posts: 156
Location: NY

PostPosted: Fri Sep 19, 2008 12:08 pm    Post subject: Reply with quote

Yep he is right the previous def (with a char *) is an old version which was in line with a previous and old SDK.

The new version with the void* is more precise and in line with last SDK versions .
_________________
--pspZorba--
NO to K1.5 !
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Sat Sep 20, 2008 2:26 am    Post subject: Reply with quote

or just use casts AND using the latest SDK and toolchain, you must declare the adhoc events in your program.
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group