 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
jo3_sum
Joined: 30 Jan 2008 Posts: 17
|
Posted: Fri Sep 19, 2008 10:38 am Post subject: Error on Zorba's Adhoc example |
|
|
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 |
|
 |
jo3_sum
Joined: 30 Jan 2008 Posts: 17
|
Posted: Fri Sep 19, 2008 11:00 am Post subject: |
|
|
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 |
|
 |
pspZorba
Joined: 22 Sep 2007 Posts: 156 Location: NY
|
Posted: Fri Sep 19, 2008 12:08 pm Post subject: |
|
|
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 |
|
 |
Pirata Nervo
Joined: 09 Oct 2007 Posts: 409
|
Posted: Sat Sep 20, 2008 2:26 am Post subject: |
|
|
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 |
|
 |
|
|
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
|