can not build steamVR-OSVR
Closed this issue · 9 comments
Description of issue
I managed to build SteamVR-OSVR distrib with cmake without error messages, but there no file in output dir
Steps to reproduce the problem
see the attached doc "trying to build OSVR-teamVR.pdf"
How can the problem be reproduced?
by following the process described in "trying to build OSVR-teamVR.pdf". Did it 2 times in different directory.
System configuration
Please specify any relevant system configuration information.
- Graphics card(s):
- Operating system: win10 64b
- Version of SteamVR:
- Version of SteamVR-OSVR: latest downladable on github
Attached files
Please attach the following files:
Trying to build OSVR-steamVR.pdf
Try the following:
- Build and install jsoncpp.
git clone --recursive https://github.com/OSVR/SteamVR-OSVR.git
- Create a
build
directory. - Run CMake, set
CMAKE_PREFIX_PATH
to point at the OSVR SDK root directory for your architecture. Also add the root dir of jsoncpp to that list if it's installed in a different location. - Then click Configure and Generate.
- Finally, open the
.sln
file and build it.
I can not make it work, see Trying to build OSVR_2.pdf
Instead of setting the CMAKE variables as environment variables, you can pass them to the cmake.exe
command-line program:
cmake -DCMAKE_PREFIX_PATH=c:/whatever -DCMAKE_INSTALL_PREFIX=c:/whatever
The output you showed means that CMake couldn't find the jsoncpp files.
The first error is linked to the localisation of builded jsoncpp lib. If I set the variable to D:\dev\jsoncpp\build\src\lib_json\Release where there is the jsoncpp.lib generated there is no error on make, but there are errors on compilation of .sln file.
If I used the jsoncpp libs given in the readme of SteamVR-OSVR there are no errors at all, but some warning regaring static json library. But If I put the "driver_osvr.dll" found in D:\dev\SteamVR-OSVR\build\src\Release into the 0.8.0 steamVR-OSVR dir, steamVR can not start...
Compilation is a quite complex process for noobs like me.
What should I do in visual studio to compile OSVR-SteamVR once the cmake is done without errors ?
Then what files should I have in what directory ?
The DLLs with D
at the end of their name refer to debug builds. You should build a Release or RelWithDebInfo build instead. Make sure you copy all the required DLLs to the same directory as your driver_osvr.dll
file. (If you build the INSTALL project, it will copy all the required DLLs over for you. Set the CMAKE_INSTALL_PREFIX
CMake variable to where you want everything installed.)
You can ignore the API-MS-* warnings.
I found how to have all the dll copied by Visual studio (use of deploy menu option). But when I copy the generated dll into the 0.8.0 steamVR install (at the right place) steamVR is still not working...
And there is still references of debug dll in the dirver_osrv.dll, even if I have choosen the "Release" option in VS...
Things are going worse : I can no more compile the driver...
I uninstall Visual studio and installed it again
I get again SteamVR-OSVR from github using the "git" command
I am able to compile a test program in 32 or 64 bit (checked in task manager)
I am able to compile jsoncpp library and have the right package
But I have now the following error message when I tried to generate the solution for steamVR-OSVR:
I joined the cmakecahe.txt and a copy of the log for the comilation on Visual studio
CMakeCache_1.txt
log_1.txt
Edit : I discovered that a lot of variables are not set by cmake-gui or have incorrect value. SO I fill the CMakeCache.txt but I still have the same compilation problem.
Here is the last version :
CMakeCache.txt
What should I use for osvrDisplay_LIB_DEPENDS:STATIC, osvrDisplay_LIB_DEPENDS:STATIC and osvrDisplay_static_LIB_DEPENDS:STATIC ?
Here is a guide that summarize the things I have done to compile the driver:
STEAMVR-OSVR compilation for noobs.pdf