• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ChrisPepper1989

Trouble with hidpi.h from WDK, trying to use WiiYourself

11 posts in this topic

Hello im trying to use http://wiiyourself.gl.tter.org/, to start programming with the wiimote and i have downloaded the WDK drom msdn 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! I have tried this post on two msdn forums already but had no luck, so im trying good old gamedev! http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/9aa7cb30-9a96-4fb5-9b3d-427e73159cce/
0

Share this post


Link to post
Share on other sites
Looks like the source annotations in hidpi.h are used without the appropriate headers being directly included, or brought in by other includes you have. Anyhoo, all the undefined bits from those errors you listed live in ddk/wdm.h from the wdk.

Edit:
Maybe your version of the SDK is out of date? I just compiled the code without modification with the WDK from MSDN and the latest version of the SDK.
0

Share this post


Link to post
Share on other sites
Thank you so much for your reply, im afraid im still having problems, it should be the most up to date, i downloaded the SDK yesterday and i downloaded and installed WDK at the same time, it is starting to look like perhaps something didnt install correctly or im still missing some form of set up. perhaps this has something to with running windows 7???

i think i shall try downloading the SDK again, are you using the most up to date WDK???

after including the line "#include <ddk/wdm.h>"

making the code:

#include "wiimote.h"
#include <sys/types.h> // for _stat
#include <sys/stat.h> // "
#include <process.h> // for _beginthreadex()
#include <wtypes.h>
#include <setupapi.h>
#include <ddk/wdm.h>
extern "C" {

# ifdef __MINGW32__
# include <ddk/hidsdi.h>// from WinDDK
# else

#include <api/hidsdi.h>
# endif
}




it now gives the error:

Error 1 fatal error C1083: Cannot open include file: 'ntdef.h': No such file or directory C:\WinDDK\7600.16385.0\inc\ddk\wdm.h 54

perhaps i need another line in my include directory list, ill start trying that now.

Thank you so much for your reply and anymore help you can give.

EDIT:

Ok so i re-downloaded the SDK, i still had problems, after putting api/ infront of ntdef.h and in front of a kernelspecs.h i then get this list of errors:

Error 1 error C2144: syntax error : 'char' should be preceded by ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 356
Error 2 error C3861: 'SAL_functionClass': identifier not found c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 356
Error 3 error C2059: syntax error : ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 356

i know i shudnt put api/ infront of everything but if i put
C:\WinDDK\7600.16385.0\inc\api
in my include directions then i get this nice list of errors instead:

Error 1 error C2065: '_In_' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 60
Error 2 error C2144: syntax error : '_EXCEPTION_RECORD' should be preceded by ')' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 60
Error 3 error C2448: '_except_handler' : function-style initializer appears to be a function definition C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 60
Error 4 error C2144: syntax error : 'void' should be preceded by ';' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 61
Error 5 error C2144: syntax error : '_CONTEXT' should be preceded by ';' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 62
Error 6 error C2144: syntax error : 'void' should be preceded by ';' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 63
Error 7 error C2059: syntax error : ')' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\excpt.h 64
Error 8 error C2144: syntax error : 'int' should be preceded by ';' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 94
Error 9 error C2065: '_In_' : undeclared identifier C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 94
Error 10 error C2144: syntax error : 'int' should be preceded by ')' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 94
Error 11 error C2448: '_isctype' : function-style initializer appears to be a function definition C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 94
Error 12 error C2144: syntax error : 'int' should be preceded by ';' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 94
Error 13 error C2059: syntax error : ')' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 94
Error 14 error C2144: syntax error : 'int' should be preceded by ';' C:\Program Files\Microsoft Visual Studio 9.0\VC\include\ctype.h 95

so i really have no idea what im doing wrong, do you think it could be a windows 7 problem??

[Edited by - ChrisPepper1989 on August 22, 2009 3:13:06 PM]
0

Share this post


Link to post
Share on other sites
I rejigged the order of the include directories in VS's settings so that the original VS version of the SDK was at the top, and got exactly the errors you were encountering both with and without wdm.h.

Putting the path to the new SDK first in the list of includes compiles it fine, without wdm.h.
0

Share this post


Link to post
Share on other sites
its great to see some progress but im not quite sure what your saying, when you say the original SDK are you talking about DDK? heres an image of my current VS image settings im not really sure what to change around but ill have a rijig and see what happens, i was under the impression it wouldnt make a difference what order those lines were in.


current VS settings

Thank you so much for your help so far i think if you hadnt replied i would have given up on this project by now!

-Chris
0

Share this post


Link to post
Share on other sites
Mine looks like this. Depending on what you're planning to do with the library, it might be easier to download mingw and build it with that. The library will be usable from VS projects but you won't be able to set breakpoints in it or do anything else that requires debugging information.
0

Share this post


Link to post
Share on other sites
thank u for ur link, i was wondering sbout this line:
"G:\SDK\Include = the new SDK from MSDN"
is that the windows SDK in that case if i moved my line:
$(WindowsSdkDIR)Include
like you have perhaps it will work :) unforntunatley im not at the machine with my project im using a friends and i'm going away to leeds festival tomorrow for 5 days :( so i won't be able to test this theory out, i will however be doing this first thing when i get back and will update you on how its going. mingw also looks interesting i mite give that a whirl but im not sure why it should work better then VS. When i get things going im hoping to start a game that uses head tracking and look into more 3D technologies to try and create a 3D dog fighting game, i was also thinking if the project carries enough weight i might go on to invesigate virtual 3D game technolgy as my disertation this year.

Thanks again for your continuing patience and help with me and my set up problems!!
-Chris
0

Share this post


Link to post
Share on other sites
hello again, i refigured my tool options:

tool options

and im getting errors in my driver specs .h:
"
Error 1 error C2144: syntax error : 'char' should be preceded by ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 356
Error 2 error C3861: 'SAL_functionClass': identifier not found c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 356
Error 3 error C2059: syntax error : ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 356
Error 4 error C2144: syntax error : 'char' should be preceded by ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 374
Error 5 error C3861: 'SAL_acquire': identifier not found c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 374
Error 6 error C2059: syntax error : ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 374
Error 7 error C2144: syntax error : 'char' should be preceded by ')' c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 381
Error 8 error C3861: 'SAL_release': identifier not found c:\winddk\7600.16385.0\inc\api\DriverSpecs.h 381
"

and this is with the #include <wdm.h>, without it i get all the errors in hidpi:

"Error 37 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 424
Error 38 error C2086: 'int NTSTATUS' : redefinition c:\winddk\7600.16385.0\inc\api\hidpi.h 424
Error 39 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 433
Error 40 error C2065: 'DISPATCH_LEVEL' : undeclared identifier c:\winddk\7600.16385.0\inc\api\hidpi.h 488
Error 41 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 489
Error 42 error C2374: '__drv_maxIRQL' : redefinition; multiple initialization c:\winddk\7600.16385.0\inc\api\hidpi.h 489
Error 43 error C2146: syntax error : missing ';' before identifier 'NTSTATUS' c:\winddk\7600.16385.0\inc\api\hidpi.h 489
Error 44 error C2143: syntax error : missing ';' before '__stdcall' c:\winddk\7600.16385.0\inc\api\hidpi.h 489
Error 45 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 489
Error 46 error C2086: 'int NTSTATUS' : redefinition c:\winddk\7600.16385.0\inc\api\hidpi.h 489
Error 47 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\winddk\7600.16385.0\inc\api\hidpi.h 495
"
0

Share this post


Link to post
Share on other sites
I solved my problem, after studying your set up adeyblue, i realised that the major difference was the fact that i didnt have the MSDN SDK, which i didnt realise the WDK needed to work, to be perfectly honest i had no idea of the MSDN SDK's existence and i find it strange that ive never needed the windows SDK before when ive used windows programing to set up OpenGL :S but i supose thats the way in programming when ur still really a noob!

So id like to say a big big thank you to adeyblue for putting up with me and providing the all important screen grab, everthings up and running nicely now and im having fun messing around with the wiimote, now i can finally get some work done =]!

Thanks again, Chris
0

Share this post


Link to post
Share on other sites
Wow, don't let it ever be said that you're not persistent :) I didn't see any of the followup posts since my last response but congrats on solving it. Here's hoping that using it isn't half as painful as setting it up.
0

Share this post


Link to post
Share on other sites
i'm confused, what's this MSDN SDK? is it the Windows SDK(http://msdn.microsoft.com/en-us/windows/bb980924.aspx)?
0

Share this post


Link to post
Share on other sites
Hi.. please i have the same problem that you had....
Help me... send me the steps... what do you install first, second an last please..
it is for my thesis im very stressed...
my mail is charllesky@hotmail.com if you want send me something... or in the case send me the project please...!! :)
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0