lukexi / openvr-hs Goto Github PK
View Code? Open in Web Editor NEWBindings for OpenVR and the Valve/HTC Vive
Home Page: http://rumpus.land
License: BSD 3-Clause "New" or "Revised" License
Bindings for OpenVR and the Valve/HTC Vive
Home Page: http://rumpus.land
License: BSD 3-Clause "New" or "Revised" License
I tried building the test cases using cabal test. cabal test cubes didn't work either.
I managed to get as far as this output, after altering the cabal file for openvr-hs to point its extra include and extra library dirs at the spot where my OpenVR install was placed.
The resulting linker errors are below and relate to the functions VR_GetGenericInterface and VR_GetVRInitErrorAsEnglishDescription.
This may or may not be related to a separate problem: When I first tried to build the openvr-hs library, I ran into a complaint here in openvr_capi_fixed.h:
// #if defined( __WIN32 )
// typedef char bool;
// #else
#include <stdbool.h>
// #endif
Without the commenting-out, the compiler complains that bool is already defined, and it fails to even build, much less install, openvr-hs. But perhaps this is causing problems for the linker later on.
Advice?
$ cabal test
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring openvr-hs-0.1.0.0...
Preprocessing library openvr-hs-0.1.0.0...
[1 of 1] Compiling Graphics.VR.OpenVR ( src\Graphics\VR\OpenVR.hs, dist\build\Graphics\VR\OpenVR.o )
[1 of 1] Compiling Graphics.VR.OpenVR ( src\Graphics\VR\OpenVR.hs, dist\build\Graphics\VR\OpenVR.p_o )
Preprocessing test suite 'minimal' for openvr-hs-0.1.0.0...
[1 of 1] Compiling Main ( app\Minimal.hs, dist\build\minimal\minimal-tmp\Main.p_o )
Linking dist\build\minimal\minimal.exe ...
C:\msys64\home\Michael Jones\Documents\Programming\Haskell\OpenVR\openvr-hs\dist\build/libHSopenvr-hs-0.1.0.0-K5yHTjbmNrL7i9N4GDus50_p.a(openvr_capi_helper.p_o):openvr_capi_helper.cpp:(.text+0x2c): undefined reference to VR_GetGenericInterface(char const*, EVRInitError*)' C:\msys64\home\Michael Jones\Documents\Programming\Haskell\OpenVR\openvr-hs\dist\build/libHSopenvr-hs-0.1.0.0-K5yHTjbmNrL7i9N4GDus50_p.a(openvr_capi_helper.p_o):openvr_capi_helper.cpp:(.text+0x49): undefined reference to
VR_GetVRInitErrorAsEnglishDescription(EVRInitError)'
collect2.exe: error: ld returned 1 exit status
gcc.exe' failed in phase
Linker'. (Exit code: 1)
After some cabal file hacking, I got around this I think. I'm having a different issue with linking, which I will post separately, which I hope you can help me resolve.
For the record, I just had to tell the gl library to accept a wider range of allowable dependencies for the directory library.
Hi! I'm just getting together the necessary tools and dependencies to try out your OpenVR/Haskell linkages. I think I'm almost there. I managed to build your lens-extra and linear-extra packages.
However, when I tried to build your gl-pal package, I encountered the errors below. I could fight with tracking down the offending library lines, but I thought I'd ask if you'd encountered this yet, and how to quickly fix it.
Looking forward to experimenting with Haskell based VR. :)
CodeWeaver@LongShot MINGW64 ~/Documents/Programming/Haskell/OpenVR
$ cd gl-pal
CodeWeaver@LongShot MINGW64 ~/Documents/Programming/Haskell/OpenVR/gl-pal
$ cabal sandbox init --sandbox ../
Writing a default package environment file to C:\msys64\home\Michael
Jones\Documents\Programming\Haskell\OpenVR\gl-pal\cabal.sandbox.config
Using an existing sandbox located at C:\msys64\home\Michael
Jones\Documents\Programming\Haskell\OpenVR\
CodeWeaver@LongShot MINGW64 ~/Documents/Programming/Haskell/OpenVR/gl-pal
$ cabal install
Resolving dependencies...
In order, the following would be installed:
async-2.1.1 (via: fsnotify-0.2.1) (new package)
clock-0.7.2 (via: gl-pal-0.1.0.0) (new package)
colour-2.3.3 (via: gl-pal-0.1.0.0) (new package)
directory-1.2.7.1 (latest: 1.3.1.0) (via: fsnotify-0.2.1 unix-compat-0.4.3.1 gl-0.7.8.1 cabal-doctest-1 Cabal-1.24.2.0 process-1.4.3.0 hxt-9.3.1.16 file-embed-0.0.10 Win32-notify-0.3.0.1) (new version)
Win32-notify-0.3.0.1 (via: fsnotify-0.2.1) (new package)
file-embed-0.0.10 (via: gl-pal-0.1.0.0) (new package)
fixed-0.2.1.1 (via: gl-0.7.8.1) (new package)
half-0.2.2.3 (via: gl-0.7.8.1) (new package)
hxt-charproperties-9.2.0.1 (via: hxt-9.3.1.16 hxt-regex-xmlschema-9.2.0.3 hxt-unicode-9.0.2.4) (new package)
hxt-unicode-9.0.2.4 (via: hxt-9.3.1.16) (new package)
parsec-3.1.11 (via: hxt-9.3.1.16 network-uri-2.6.1.0 hxt-regex-xmlschema-9.2.0.3) (new package)
hxt-regex-xmlschema-9.2.0.3 (via: hxt-9.3.1.16) (new package)
network-uri-2.6.1.0 (via: hxt-9.3.1.16) (new package)
hxt-9.3.1.16 (via: gl-0.7.8.1) (new package)
process-1.4.3.0 (latest: 1.6.0.0) (via: Cabal-1.24.2.0) (reinstall) (changes: directory-1.3.0.0 removed)
Cabal-1.24.2.0 (via: cabal-doctest-1) (reinstall) (changes: directory-1.3.0.0 removed, process-1.4.3.0 removed)
cabal-doctest-1 (reinstall) (changes: Cabal-1.24.2.0 removed, directory-1.3.0.0 removed)
split-0.2.3.1 (via: gl-0.7.8.1) (new package)
gl-0.7.8.1 (via: gl-pal-0.1.0.0) (new package)
unix-compat-0.4.3.1 (via: fsnotify-0.2.1) (new package)
fsnotify-0.2.1 (via: gl-pal-0.1.0.0) (new package)
zlib-0.6.1.2 (via: JuicyPixels-3.2.8) (new package)
JuicyPixels-3.2.8 (via: gl-pal-0.1.0.0) (new package)
gl-pal-0.1.0.0 (new package)
cabal.exe: The following packages are likely to be broken by the reinstalls:
ghc-8.0.2
Use --force-reinstalls if you want to install anyway.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.