Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Compilation of C++ projects fail in VS2015 #44

Open
Frogburt opened this issue Nov 29, 2016 · 7 comments
Open

Compilation of C++ projects fail in VS2015 #44

Frogburt opened this issue Nov 29, 2016 · 7 comments

Comments

@Frogburt
Copy link

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.

@PomanoB
Copy link

PomanoB commented Nov 29, 2016

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

@Frogburt
Copy link
Author

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

@Frogburt
Copy link
Author

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

@gusmanb
Copy link
Owner

gusmanb commented Nov 29, 2016

@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.

@Frogburt
Copy link
Author

Frogburt commented Dec 3, 2016

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.

@wildwing1970
Copy link

wildwing1970 commented Jan 7, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants