I’ve never had this problem using ofxOsc with other projects. And ofxDSHapVideoPlayer hasn’t thrown this error until now. But something about having them both in the same project throws this error:
Severity | Code | Description | Project | File | Line | Suppression State
-- | -- | -- | -- | -- | -- | --
Error | C2664 | ‘CVideoTransformFilter::CVideoTransformFilter
(LPCTSTR,LPUNKNOWN,const IID &)’: cannot convert argument 1 from ‘const wchar_t [28]’ to ‘LPCTSTR’ | example | C:\Users\selli\openFrameworks\addons\ofxDSHapVideoPlayer\src\DSUncompressedSampleGrabber.cpp | 20 |
![image](https://user-images.githubusercontent.com/16056630/194281080-cd021400-d2f9-46cf-84ae-c7583ccdde31.png)
which is weird, because it looks like the argument being given there is indeed in the LPCTSTR format (prefixed with an L). I’m able to replicate this error easily by just adding ofxOsc to ofxDSHapVideoPlayer’s example project in the Project Generator. I’m on Windows 10 using Visual Studio 2019
I’ve never had this problem using ofxOsc with other projects. And ofxDSHapVideoPlayer hasn’t thrown this error until now. But something about having them both in the same project throws this error:
OK, fixed this by changing
CVideoTransformFilter(FILTERNAME, (IUnknown*)pOuter, CLSID_SampleGrabber)
to
CVideoTransformFilter((LPCTSTR)FILTERNAME, (IUnknown*)pOuter, CLSID_SampleGrabber)
Not sure why having osxOsc in the project causes this, but super happy to find a fix.