ofxOpenVR + ofxCeres

I am trying to follow @elliotwoods suggestion in trying to use the Vive VR system in combination with his ofxCeres calibration.

I am trying to compile the example-drawing from his TrackpadAndProps branch but get this error about ControllRoll not being a class or part of the namespace:

Using the original repo by @smallfly https://github.com/smallfly/ofxOpenVR works fine on my windows 10 machine.

Trying to use project generator on the OpenVR branch of ofxCeres produces this error message:

Any advice would be greatly appreciated.

did you try to delete some folder files as config.make?
I mean before run PG…
I remember similar errors sometimes on Windows.
then I deleted all files except src, bin (if required data) and addons.make

1 Like

Thanks for the tip.
Removing the config.make file removed the error and allowed me to use the Project Generator to make the project.

On to the next bugs.

1 Like

for now I am trying to just get the TrackpadAndProps branch of ofxOpenVR working.

Since this ofxOpenVR uses .props file to set things up I followed the steps as outlined in this ofxAddonLib Elliot addon.

I did step 1 and 2 because I am unsure what to do with step 3.
Compiling after adding the ofxOpenVR.props file still produces this error

|Error|C2653|'ControllerRole': is not a class or namespace name

Here I am trying to follow step 3 but don’t see a way to point to ofxOpenVR.

Right click on your project (e.g. 'mySketch') and select 'Add Reference...', and add a reference to ofx???Lib

If I try to compile the example-simple (which was updated more recently) I get a different error.

What Visual Studio are you using?
the more “stable” version is to use VS 2017.
I would try to remove the other versions like 2019, 2022…
(Then you can update when you are more familiar with Windows/used addons behavior.)
It has the extension to add addons,
but also sometimes you will get some errors because the compilers versions.

I am using 2019 as it seems to be recommenced here.
But I have to admit I am a macOS user just recently getting familiar with Windows 10 and VS.

Thanks for the tip.

Yes, this info is recently updated…
it’s a little mess to merge many VS versions.
When opening the project for first time, you can update the PG (2017) generated project to 2019, and it usually works.
Also maybe you can use the “MS selector thing” to set the VS 2017 as default and avoid uninstalling the others 2019/2022, but sometimes seems tricky.

Yes I have noticed that some projects say something about v141 and want to update to v142. I usually ok that and the example projects have build just fine. The original ofxOpenVR examples build just fine with VS2019. It’s just the fork with that specific branch.

Anyway. I will try VS2017 and see.
Thx again

It has been a long time, but I have seen the error you get with the example-simple when I was using openVR. I am pretty sure you can fix it by casting the variable: LPCWSTR(const char variable) called in the function throwing the error.

Were you able to add the ofxOpenVR.props sucessfully for example-simple ?

Just to make sure, when you make a project with the PG you dont need to add any of the addons, the props file will do all the work (if you get it working).

Lastly openVR is a git submodule, I am guessing you did this, but you need to init the submodule to get the required repo in the libs folder.

1 Like

If you want to have VS 2017-2019-2022 together:

After creating the project with the PG,
you can open it with VS 2017,
but then right-click to openframeworksLibs / properties
(maybe to the OF app project too…)
and you have to set the platform to v141 (VS 2017) like this:

You can’t run a newer Toolset from an older VS version.
(Not sure about SDK version)

It’s a common problem when multiple VS versions installed.

(Sometimes is required if you want to check out of the box projects that was made from different versions.)

1 Like

I already have VS 2019 installed.
I now also installed VS 2017 but had an error message about The Windows SDK version 10.0 was not found

So, I opened the installer app again at C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe

and also installed a bunch of the other options too.

Then when opening the .sln solution for a specific example I made sure to navigate to all the different Properties menus to set them to v141

And hurray a simple example compiles on Windows 10 with OF 0.11.2 and VS2017

Thanks for your suggestions.

I believe I added the ofxOpenVR.props file correctly. Not sure how to check if it took successfully?


I am not sure where you are suggesting to do this casting?

Thanks again for everyones input !!