Compiling Wiiuse and Vrpn under windows 10

479 views
Skip to first unread message

Kosen

unread,
Feb 21, 2016, 6:22:12 PM2/21/16
to VR Geeks
Hello VR friends.
I hope everyone of you is going fine.

I'm having some difficulty to compile wiiuse and vrpn using Cmake (I'm on Windows 10:'-( ).
Do you know any working procedures to compile them on this OS.
I tried using Visual Studio 2015 and Visual Express C++ 2010, but I still have a problem to make the link to the associated WKD (Windows Driver Kit, required by wiiuse) for windows 10.

Are you aware of any working solution with windows 10. If so, could you explain it to me?
If not, I'm seriously thinking to use an old machine on windows 7 to compile those files.
However, I'm not sure if I'll be able to use them with Windows 10.

Many thanks

Sincerely

Kosen

Ps: If you have a working copy of vrpn that include wiiuse (I need the Wii Balance board) and work under Windows 10, I'm interested to have it.

Jan Ciger

unread,
Feb 21, 2016, 6:59:11 PM2/21/16
to vr-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 22/02/16 00:22, Kosen wrote:
> Hello VR friends. I hope everyone of you is going fine.
>
> I'm having some difficulty to compile wiiuse and vrpn using Cmake
> (I'm on Windows 10:'-( ).

Didn't you file an issue about this in the Wiiuse GitHub repo? :)

> Do you know any working procedures to compile them on this OS. I
> tried using Visual Studio 2015 and Visual Express C++ 2010, but I
> still have a problem to make the link to the associated WKD
> (Windows Driver Kit, required by wiiuse) for windows 10.
>
> Are you aware of any working solution with windows 10. If so, could
> you explain it to me? If not, I'm seriously thinking to use an old
> machine on windows 7 to compile those files. However, I'm not sure
> if I'll be able to use them with Windows 10.

The problem is that the WDK likely installs in a different place on
Win10 than on Win7 and then CMake is unable to find it.

You could work the issue around by manually setting the CMake variables
WINHID_INCLUDE_DIRS and WINHID_LIBRARIES to point to the directories
where the files hidsdi.h and libhid.lib are, respectively.

I can have a quick look tomorrow at work, there I have a Win10 machine.

One last tip - don't use Visual C++ 2010 to compile for Windows 10. It
will likely cause you problems down the road because that toolchain
doesn't support Win10.

Regards,

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFWyk9Jn11XseNj94gRArlMAKDnsLCkGb3qqpnmKD+ClUjC7T5CHgCghc1q
qLQXeOKqjGPmVylQVeEfuJw=
=A9ig
-----END PGP SIGNATURE-----

Kosen

unread,
Feb 22, 2016, 5:29:06 AM2/22/16
to VR Geeks
Good morning.
Thanks Jan for your (super) quick answer :-)

You're right, I filed this issue on the git repo (here). ^^
The problem is that I don't have any file named "hidsdi.h" and "libhid.lib" in my windows 10 WDK forlder (C:\Program Files (x86)\Windows Kits\10). :-(

I'll use Visual Studio Community 2015 in that case.

Sincerely

Kosen

Jan Ciger

unread,
Feb 22, 2016, 9:22:16 AM2/22/16
to vr-g...@googlegroups.com
Hello,

On Mon, Feb 22, 2016 at 11:29 AM, Kosen <remi.c...@gmail.com> wrote:
> Good morning.
> Thanks Jan for your (super) quick answer :-)

Welcome.

>
> You're right, I filed this issue on the git repo (here). ^^

I know :) I am Ryan's co-maintainer of the mess that Wiiuse is. BTW,
Ryan is on this list as well :)


> The problem is that I don't have any file named "hidsdi.h" and "libhid.lib"
> in my windows 10 WDK forlder (C:\Program Files (x86)\Windows Kits\10). :-(
>
> I'll use Visual Studio Community 2015 in that case.
>

Yeah, that is normal. The Win10 kit has split the library into (at
least) two - hidclass.lib and hidparse.lib. I have no idea whether or
not that is compatible with the previous hid.lib. I don't even know
which header one has to use because there doesn't seem to be anything
obviously hid-related in there :(

I have a fix that uses the 8.1 kit instead (C:\Program Files
(x86)\Windows Kits\8.1\..). That builds on Windows 10 and with Visual
Studio 2015 Community. I couldn't test it, because I don't have a
Wiimote nor Bluetooth here at the moment, but it should work.

If you want to test, get the source from here:
https://github.com/janoc/wiiuse

I have opened a pull request for Ryan to review because I had to
manhandle his CMake script a bit. We may also want to future-proof
this a bit because Microsoft seems to be keen on constantly changing
the paths and folder naming conventions between versions.

Regards,

Jan

Kosen

unread,
Feb 22, 2016, 2:44:51 PM2/22/16
to VR Geeks
I tried on visual studio express 2013,it compiled, and the "wiiuseexample.exe" output the values of my wii balance board.

I still have to try on visual studio 2015, but I have to fix an error (CMAKE_CXX_COMPILER could be found).
I'll keep you inform.

Next step is to connect it to vrpn :-)

Thanks a lot :-)

Ps : I know that ryan and you where on this group ^^

Jan Ciger

unread,
Feb 22, 2016, 2:48:53 PM2/22/16
to vr-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22/02/16 20:44, Kosen wrote:
> I tried on visual studio express 2013,it compiled, and the
> "wiiuseexample.exe" output the values of my wii balance board.
>
> I still have to try on visual studio 2015, but I have to fix an
> error (CMAKE_CXX_COMPILER could be found). I'll keep you inform.

You likely didn't run the correct vcvarsall.bat script before running
cmake.

> Next step is to connect it to vrpn :-)
>
> Thanks a lot :-)

Welcome.

Regards,

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFWy2Yin11XseNj94gRAgF3AKDYLqwM6Xsrz1xEMxS4994NMmr+ngCgkFuz
/HdSQGlBERlDnTri0tUbp6k=
=Jj5X
-----END PGP SIGNATURE-----

Remi Cambuzat

unread,
Feb 23, 2016, 12:45:56 PM2/23/16
to vr-g...@googlegroups.com
Hej hej.

I managed to compiled wiiusse under VS2015, thanks for your tips with the "vcvarsall.bat".
And I linked it to vrpn :-) (it work with VS2010 not in VS2015), but this will be the subject of another message.

As I'm one of the new user of wiiuse under windows 10, I also tried to install the SDL example (for the community).

I use the Development Libraries :

SDLMAIN_LIBRARY = C:/SDL2/SDL2-2.0.4/lib/x64/SDL2main.lib
SDL_INCLUDE_DIR = C:/SDL2/SDL2-2.0.4/include
SDL_LIBRARY = C:/SDL2/SDL2-2.0.4/lib/

It worked fine, but I don't understand why CMake do not find my GLUT repository:

Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)

By the way the OPENGL_gl_LIBRARY (=opengl32) and OPENGL_glu_LIBRARY (=glu32), were filled correctly.
Maybe you have an idea why I got this error.
It's not really a problem as I'm able to compile wiiuse ;-)

++


--
You received this message because you are subscribed to a topic in the Google Groups "VR Geeks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vr-geeks/Oxp6wem1JQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vr-geeks+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/vr-geeks.
For more options, visit https://groups.google.com/d/optout.



--
Cambuzat Rémi
Ingénieur en Informatique et réalité virtuelle, spécialisation Robotique ( Master SDI-SAR : UPMC/ENSAM)
Adresse : 8 Rue de l'Espérance, 94800 Villejuif
Tel : 06.95.13.53.06

Jan Ciger

unread,
Feb 23, 2016, 1:04:46 PM2/23/16
to vr-g...@googlegroups.com
Hello,

On Tue, Feb 23, 2016 at 6:45 PM, Remi Cambuzat <remi.c...@gmail.com> wrote:
Hej hej.

I managed to compiled wiiusse under VS2015, thanks for your tips with the "vcvarsall.bat".
And I linked it to vrpn :-) (it work with VS2010 not in VS2015), but this will be the subject of another message.

Good.

 

As I'm one of the new user of wiiuse under windows 10, I also tried to install the SDL example (for the community).

I use the Development Libraries :

SDLMAIN_LIBRARY = C:/SDL2/SDL2-2.0.4/lib/x64/SDL2main.lib
SDL_INCLUDE_DIR = C:/SDL2/SDL2-2.0.4/include
SDL_LIBRARY = C:/SDL2/SDL2-2.0.4/lib/

It worked fine, but I don't understand why CMake do not find my GLUT repository:

Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)

By the way the OPENGL_gl_LIBRARY (=opengl32) and OPENGL_glu_LIBRARY (=glu32), were filled correctly.
Maybe you have an idea why I got this error.

Did you actually compile and install it? And did you point CMake to it? GLUT doesn't ship with Windows, it is not really part of OpenGL, so you need to download the code (e.g. FreeGLUT) and build it.

However, it is normally not necessary, the examples are the same whether you use SDL or GLUT.

Regards,

Jan

Remi Cambuzat

unread,
Feb 24, 2016, 9:05:16 AM2/24/16
to vr-g...@googlegroups.com
Hej Hej.

Here is the awaited thread with VS2015 for vrpn ^^.

Here is my CMake option (in advanced) :
BUILD_TESTING : no
OPENHAPTICS_ROOT_DIR : no

vrpn_build client et server : checked

VRPN_GPL_SERVER = yes
VRPN_USE_DIRECTINPUT = yes
VRPN_USE_WIIUSE = yes
VRPN_USE_WINDOWS_XINPUT = yes
VRPN_USE_WINSOCKS2 = yes

WIIUSE_INCLUDE_DIR : C:/Users/remi/ownCloud/vrpn wiiuse/wiiuse-jean/wiiuse-master/src
WIIUSE_ROOT = null
WIIUSE_RUNTIME_LIBRARY : C:/Users/remi/ownCloud/vrpn wiiuse/wiiuse-jean/cmake/src/Release/wiiuse.dll

WINHID_INCLUDE_DIR : C:/Program Files (x86)/Windows Kits/8.1/Include/shared
WINHID_LIBRARY : C:/Program Files (x86)/Windows Kits/8.1/lib/winv6.3/um/x86/hid.lib
WINHID_ROOT_DIR = null

Using those parameter it compile under VS2010, and manage to have a WiiFit entry on my vrpn feed ( a strange one but it will the in next message :P ).

But it do not compile properly on VS2015 ( vrpn_server.exe is not created), where I have a strange math.h issue :S.
Here is a sample of my compiling log :
"
...
6>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt\math.h(408): error C2588: '::!_finite': illegal global finalizer (compiling source file C:\Users\remi\ownCloud\vrpn wiiuse\VRPN\vrpn-master\vrpn_Dyna.C)
...
6>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(733): error C2039: 'isinf': is not a member of '`global namespace'' (compiling source file C:\Users\remi\ownCloud\vrpn wiiuse\VRPN\vrpn-master\vrpn_Dyna.C)
..
13>LINK : fatal error LNK1181: cannot open input file '..\Release\vrpnserver.lib'
...
"
Here is the complete log ( edit : this framapad that will last 2 mouth)

I tried to change the path, but there is no math.h file in (C:\Program Files (x86)\Windows Kits\8 and 8.1) ^^

Do you have any idea of the causes of the pbm ?

Almost there :D

Thanks

++


--
You received this message because you are subscribed to a topic in the Google Groups "VR Geeks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vr-geeks/Oxp6wem1JQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vr-geeks+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/vr-geeks.
For more options, visit https://groups.google.com/d/optout.

Jan Ciger

unread,
Feb 24, 2016, 9:37:34 AM2/24/16
to vr-g...@googlegroups.com


On Wed, Feb 24, 2016 at 3:05 PM, Remi Cambuzat <remi.c...@gmail.com> wrote:
Hej Hej.

...

But it do not compile properly on VS2015 ( vrpn_server.exe is not created), where I have a strange math.h issue :S.
Here is a sample of my compiling log :
"
...
6>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt\math.h(408): error C2588: '::!_finite': illegal global finalizer (compiling source file C:\Users\remi\ownCloud\vrpn wiiuse\VRPN\vrpn-master\vrpn_Dyna.C)
...
6>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath(733): error C2039: 'isinf': is not a member of '`global namespace'' (compiling source file C:\Users\remi\ownCloud\vrpn wiiuse\VRPN\vrpn-master\vrpn_Dyna.C)
..
13>LINK : fatal error LNK1181: cannot open input file '..\Release\vrpnserver.lib'
...
"
Here is the complete log ( edit : this framapad that will last 2 mouth)

I tried to change the path, but there is no math.h file in (C:\Program Files (x86)\Windows Kits\8 and 8.1) ^^

Do you have any idea of the causes of the pbm ?


I think the problem is the version of the WDK/DDK you have installed. When you install it, it installs new version of the Windows 10 Kit (10.0.10586.0) and VC 2015 will use that one. Unfortunately, that version introduces new CRT (C/C++ runtime) and some incompatibilities/bugs. I was also getting weird compilation errors because of moved/renamed standard C headers with Unreal once I have installed it.

I suggest that you deinstall it. It shouldn't be needed for building Wiiuse, in fact. The hid.lib and the headers are now included in the normal SDK that comes with Visual Studio 2015, it seems. The DDK was required only on Windows 7, but the later Windows development kits include the necessary headers and library already.

Regards,

Jan



















Kosen

unread,
Feb 26, 2016, 10:45:19 AM2/26/16
to VR Geeks
Hej Hej.
I'm on my way to solve the previous pbm, however I have some deadline to keep with my research project.

I'm trying to connect a WiiBalance trough vrpn to unity Indy (as below):

WiiBoard => Vrpn Server <= Vrpn Client(c++) <=> Wrapper C++/C# <= Unity3D (indy version)

I'm using the middleware MiddleVr as it include a vrpn client and a C# wrapper (unity free cannot read c++ .dll).
However as I'm also using the free version of MiddleVr.
I sadly discovered that I'm also restricted on the number of channel that I can read on each Vrpn entry.
As my WiiFit return 96 channel (see below), it's impossible for me to process it with MiddleVr.

I read he previous thread (here) on how to connect vrpn to unity, and it seem legit to use OSVR for it.
Is it right to do so ?
     
My configuration :

    vrpn.cfg
        ....
        vrpn_WiiMote        WiiFit0 1 1 0 1
        ....
        
    C:\Users\remi\ownCloud\test vrpn>vrpn_server
        wiiuse v0.15.0 loaded.
          Fork at http://github.com/rpavlik/wiiuse
          Original By: Michael Laforest <thepara[at]gmail{dot}com> http://wiiuse.net
        vrpn: Connection request received from 127.0.0.1: 127.0.0.1 54755
        vrpn_Endpoint::getOneTCPMessage:  Can't read header (this is normal when a connection is dropped)
        vrpn: TCP handling failed, dropping connection (this is normal when a connection is dropped)
        vrpn: Connection request received from 127.0.0.1: 127.0.0.1 54757
        vrpn_Endpoint::getOneTCPMessage:  Can't read header (this is normal when a connection is dropped)
        vrpn: TCP handling failed, dropping connection (this is normal when a connection is dropped)

    C:\Users\remi\ownCloud\test vrpn>vrpn_print_devices WiiFit0@localhost
        ....
        Analog WiiFit0@localhost:
              0.90,  1.#J,  1.#J,  1.#J,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00, 34.00,  6.12, 11.31,  5.91, 57.34, -0.58,  0.40,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00,  0.00 (96 chans)
        ....
(edit : What does those channels correspond to ?)
       
Thanks again for your precious help.

I'll try to solve the previous issues when I'll be less busy :-)

++

Kosen

Remi Cambuzat

unread,
Feb 26, 2016, 10:55:43 AM2/26/16
to vr-g...@googlegroups.com
Or I could use the WiiBalanceWalker source code as it's written in C#, but I'll lose functionality and modularity. :-)

--
You received this message because you are subscribed to a topic in the Google Groups "VR Geeks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vr-geeks/Oxp6wem1JQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vr-geeks+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/vr-geeks.
For more options, visit https://groups.google.com/d/optout.

Jan Ciger

unread,
Feb 26, 2016, 12:15:45 PM2/26/16
to vr-g...@googlegroups.com

On Fri, Feb 26, 2016 at 4:55 PM, Remi Cambuzat <remi.c...@gmail.com> wrote:
Or I could use the WiiBalanceWalker source code as it's written in C#, but I'll lose functionality and modularity. :-)


Uff, I think that doesn't really have much to do with VRPN but more with what the folks at MiddleVR are doing with their Unity bindings. I am afraid I can't help you much there. Hopefully one of their guys can reply to you  - they are on this list too. VRPN can certainly handle 96 analogs (I think the limit is 128 or so).

What those VRPN analog channels mean - no idea. I have no clue about what/how Wiiuse is integrated into VRPN - you may want to check the code there as to what is mapped where. I am not even completely sure that VRPN is actually aware that you have a Balance board and not a regular Wiimote.

Re OSVR - OSVR has a native support for Unity, so you can use that. However, many devices are not supported natively yet but through an external VRPN server (OSVR uses the same protocol and it just sends you game to connect to the external server instead). The Unity plugin for OSVR is certainly better maintained than the VRPN wrappers, though.


BTW, the free version of Unity now can load C DLLs (not C++, but for another reason than license). You can use the P/Invoke C# mechanism to do so. I have used it to provide various utilities to Unity apps and it certainly works - it is often the only way how to replace/augment the missing or horribly broken stuff in Unity's ancient Mono frameworks.

The issue with C++ is related to a lack of standard ABI. C has a standard calling convetion (the extern "C" {} declarations ..) but C++ doesn't. So the only thing you can reliably load as a plugin or at runtime from a DLL is a code exporting C interface. Internally it could be written in C++, but the public API needs to be C compatible. Then you can load this from Unity or whatever other language that has some form of foreign function interface (FFI).

Regards,

J.

Ryan Pavlik

unread,
Mar 29, 2016, 8:16:28 AM3/29/16
to vr-g...@googlegroups.com

Think those first entries are something to do with either accelerometer data or the IR sensor. In any case, the values from the balance board are at the end. Look at the .h file for the wiimote driver to see what each channel contains. Certainly reasonable to use OSVR plugin for Unity to get the data, save you having to write a c wrapper then the c# loader around it. Sorry I don't have a nice device descriptor for the wiimote driver yet with nice semantic names for each channel - if you make one it would be gladly accepted.

Probably worth filing those VRPN build errors as issues in the VRPN repo, including as much information as possible on your compilation environment and configuration. Each commit to master is built with vs 2008 through 2015 in the CI, but not all with every option enabled, and all on the same nodes (so a single setup of Windows sdks, etc).

Thanks, and good luck!

Ryan


--
You received this message because you are subscribed to the Google Groups "VR Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vr-geeks+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages