ChristopherPepper1989
2009-08-21 18:04:01 UTC
Hello im trying to use http://wiiyourself.gl.tter.org/, to start programming
with the wiimote and i have downloaded the WDK to do so, ive set up the demo
in the way the ReadMe told me to however when i compile i get 163 errors in
hidpi. The WiiYourself libary was written for the older DDK but as i can only
seem to get my hands on WDK im trying to use that, the read me says it should
work by simply using a different include path and no other suggestions for
changes are made. From the read me: "You can also use the more recent WinDDK
(although there's no advantage I'm aware of) with include path 'inc/api'."
Here is the snippet of code that includes hidsdi which in turn includes hidpi:
#ifdef _MSC_VER
# pragma warning(disable: 4530)
# pragma comment(lib, "setupapi.lib")
# pragma comment(lib, "hid.lib") // for HID API (from DDK)
# pragma comment(lib, "winmm.lib") // for timeGetTime()
#endif // _MSC_VER
#include "wiimote.h"
#include <sys/types.h> // for _stat
#include <sys/stat.h> // "
#include <process.h> // for _beginthreadex()
#include <wtypes.h>
#include <setupapi.h>
extern "C" {
# ifdef __MINGW32__
# include <ddk/hidsdi.h>// from WinDDK
# else
#include <api/hidsdi.h>
# endif
}
ive tried <api/hidsdi.h> in and out of the extern "C" but it made no
difference, in the original demo code the code was within the extern.
some of the errors include:
Error 1 error C2065: 'PASSIVE_LEVEL' : undeclared identifier
c:\winddk\7600.16385.0\inc\api\hidpi.h 304
Error 2 error C4430: missing type specifier - int assumed. Note: C++
does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 3 error C2146: syntax error : missing ';' before identifier
'NTSTATUS' c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 4 error C2143: syntax error : missing ';' before '__stdcall'
c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 5 error C4430: missing type specifier - int assumed. Note: C++
does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 6 error C2377: 'NTSTATUS' : redefinition; typedef cannot be
overloaded with any other symbol c:\winddk\7600.16385.0\inc\api\hidpi.h
305
Error 7 error C4430: missing type specifier - int assumed. Note: C++
does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 309
Error 8 error C2065: 'DISPATCH_LEVEL' : undeclared identifier
c:\winddk\7600.16385.0\inc\api\hidpi.h 325
and they are all very similar, to me it would seem like there is a header
not being included that should be as all the problems seem to stem from
undefined symbols. however i can't seem to find any information on msdn or in
the WDK documentation that is a relevant information in how hidsdi / hidpi
should be set up and frankly ive been going round in circles and going slowly
insane for the past few hours and im hoping someone can help or give me a
push in the right direction! Thank you in advance for any help you can give
me!
p.s. this post has been moved from
http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/9aa7cb30-9a96-4fb5-9b3d-427e73159cce/
with the wiimote and i have downloaded the WDK to do so, ive set up the demo
in the way the ReadMe told me to however when i compile i get 163 errors in
hidpi. The WiiYourself libary was written for the older DDK but as i can only
seem to get my hands on WDK im trying to use that, the read me says it should
work by simply using a different include path and no other suggestions for
changes are made. From the read me: "You can also use the more recent WinDDK
(although there's no advantage I'm aware of) with include path 'inc/api'."
Here is the snippet of code that includes hidsdi which in turn includes hidpi:
#ifdef _MSC_VER
# pragma warning(disable: 4530)
# pragma comment(lib, "setupapi.lib")
# pragma comment(lib, "hid.lib") // for HID API (from DDK)
# pragma comment(lib, "winmm.lib") // for timeGetTime()
#endif // _MSC_VER
#include "wiimote.h"
#include <sys/types.h> // for _stat
#include <sys/stat.h> // "
#include <process.h> // for _beginthreadex()
#include <wtypes.h>
#include <setupapi.h>
extern "C" {
# ifdef __MINGW32__
# include <ddk/hidsdi.h>// from WinDDK
# else
#include <api/hidsdi.h>
# endif
}
ive tried <api/hidsdi.h> in and out of the extern "C" but it made no
difference, in the original demo code the code was within the extern.
some of the errors include:
Error 1 error C2065: 'PASSIVE_LEVEL' : undeclared identifier
c:\winddk\7600.16385.0\inc\api\hidpi.h 304
Error 2 error C4430: missing type specifier - int assumed. Note: C++
does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 3 error C2146: syntax error : missing ';' before identifier
'NTSTATUS' c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 4 error C2143: syntax error : missing ';' before '__stdcall'
c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 5 error C4430: missing type specifier - int assumed. Note: C++
does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 305
Error 6 error C2377: 'NTSTATUS' : redefinition; typedef cannot be
overloaded with any other symbol c:\winddk\7600.16385.0\inc\api\hidpi.h
305
Error 7 error C4430: missing type specifier - int assumed. Note: C++
does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 309
Error 8 error C2065: 'DISPATCH_LEVEL' : undeclared identifier
c:\winddk\7600.16385.0\inc\api\hidpi.h 325
and they are all very similar, to me it would seem like there is a header
not being included that should be as all the problems seem to stem from
undefined symbols. however i can't seem to find any information on msdn or in
the WDK documentation that is a relevant information in how hidsdi / hidpi
should be set up and frankly ive been going round in circles and going slowly
insane for the past few hours and im hoping someone can help or give me a
push in the right direction! Thank you in advance for any help you can give
me!
p.s. this post has been moved from
http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/9aa7cb30-9a96-4fb5-9b3d-427e73159cce/