PSVRFramework icon indicating copy to clipboard operation
PSVRFramework copied to clipboard

Compilation of C++ projects fail in VS2015

Open Frogburt opened this issue 8 years ago • 7 comments

Has anyone been successful in running git clone and compiling in Visual Studio? Can they provide a basic walkthrough? Eg VS version? Include --recursive when retrieving? Any other tricks? Issues I encounter: C# projects compile fine but C++ all fail. References to include/headers in external folder are not found. You can fix by resolving path in quotes rather than angular brackets. Then it starts complaining about lib files and some cannot all be found at all. Migration of PSVRToolboxSetup proj fails as incompatible. On a positive note the mouse emulation in service dependent version of PSVRToolkit works great. Happy to downgrade VS if necessary. Basic walkthrough (with versions) would be ideal.

Frogburt avatar Nov 29 '16 17:11 Frogburt

Compiled VRVideoPlayer with VS 2015

  1. Download last version headers and precompiled binary (*.lib) for VLC, GLEW, GLFW, GLM
  2. Configure library and include directories in project settings image image
  3. GLM compilation failed, define #define GLM_ENABLE_EXPERIMENTAL or add to Preprocessor definitions image

PomanoB avatar Nov 29 '16 17:11 PomanoB

Many thanks PomanoB, could you please just expand on the first point, where to find/download?

Frogburt avatar Nov 29 '16 18:11 Frogburt

VLC: http://download.videolan.org/pub/videolan/vlc/2.2.4/win64/vlc-2.2.4-win64.7z GLEW: https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0-win32.zip/download GLFW: https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN64.zip GLM: clone form https://github.com/g-truc/glm

PomanoB avatar Nov 29 '16 18:11 PomanoB

Thanks PomanoB, I expect it will all work fine now, will confirm later.

Frogburt avatar Nov 29 '16 18:11 Frogburt

@Frogburt If you still have problems here is the external folder as I have it on my computer, just replace it.

The solution for now is a bit messy, I'm not very acostumed to use external libraries on C projects as when I program C/C++ is for microcontrollers and usually everything is preconfigured on the environment (and when it's .net you just add a reference to the DLL and it's done), I must create Git submodules to initialize everything.

I advice you, on the next days I'm going to rewrite a very big part of the player to use GStreamer instead of VCL and change the orientation control.

Anyway, if you want to implement the orientation, follow these steps:

1-Remove the RemoteVRControl and SensorListener from the VRVideoPLayerGUI 2-Add a reference to PSVRFramework on the VRVideoPlayer. 3-Instantiate the class PSVRClient inside of VRPlayer class, this will give you access to all the HMD functions (also attach the interesting events, in this case with StatusUpdate and InputUpdate should be enough). 4-Wait for the device connection event (StatusUpdate with Connected=true). 5-Use the client to change to VR mode. 6-After the VR player has been launched change the update interval (client.ChangeInputUpdates()), this will make the server to start sending updates to the InputUpdate event, choose an interval of 16ms to achieve 60 updates for second. 7-When you receive any input update at the VRPlayer propagate it calling updateRotation(). 8-After finishing playing a video change the update interval to 0, this will disable updates, also is recommended to put the device on cinematic mode.

You can leave the mouse emulation enabled and the player will continue to receive updates, the system allows multiple clients to be connected to the server.

If you have any doubt ask and I will try to help.

gusmanb avatar Nov 29 '16 18:11 gusmanb

I had another try but I am too unfamiliar with C++, I find it a maze compared to C#. Anyway I am happy to wait for a release at an appropriate milestone. Thanks for your help guys. This issue can be closed if you wish gusmanb. Perhaps some of the content can be copied to a build wiki eventually.

Frogburt avatar Dec 03 '16 18:12 Frogburt

First .... let me point out .... excellent work!

Hi there. I am new to this project. I made a clone of the Framework yesterdays and tried to compile it with VS 2015. Everything went fine, but the VideoPlayer was not compiling.

After some research i found that the project settings refer to an absolute path on your local hard disk .....

Wouldn't it be better to change the additional include directories to $(ProjectDir)/external .........

include

Same with the additional libraries

grafik

wildwing1970 avatar Jan 07 '17 11:01 wildwing1970