sensics / OSVR-RenderManager

Apache License 2.0
63 stars 45 forks source link

New HMD initialization structure does not compile on Linux. #199

Closed russell-taylor closed 7 years ago

russell-taylor commented 7 years ago

Reported by Yannick Comte on OSVR-RenderManager Gitter. I think this is also a problem for us on Android.

The Linux compile error is something that I can reproduce on Ubuntu 15.10 with g++ version (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010. Looks like we're using an initializer that is not supported by all compilers. Partial error log below.

In file included from /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/RenderManagerBase.cpp:33:0: /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h: In function ‘const DirectModeVendors& osvr::renderkit::getDefaultVendors()’: /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:98:55: error: no matching function for call to ‘osvr::renderkit::vendorid::DirectModeVendorEntry::DirectModeVendorEntry()’ DirectModeVendors{Vendor{{"OVR"}, "Oculus"}, ^ /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:51:13: note: candidate: osvr::renderkit::vendorid::DirectModeVendorEntry::DirectModeVendorEntry(const PNPIDNullTerminatedType&, const char, const char) DirectModeVendorEntry(const PNPIDNullTerminatedType& pnpid, const char* dispDes ^ /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:51:13: note: candidate expects 3 arguments, 2 provided /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:49:13: note: candidate: osvr::renderkit::vendorid::DirectModeVendorEntry::DirectModeVendorEntry(const PNPIDNullTerminatedType&, const char) DirectModeVendorEntry(const PNPIDNullTerminatedType& pnpid, const char dispDes ^ /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:49:13: note: no known conversion for argument 1 from ‘’ to ‘const PNPIDNullTerminatedType& {aka const std::array<char, 4ul>&}’ /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:47:22: note: candidate: osvr::renderkit::vendorid::DirectModeVendorEntry::DirectModeVendorEntry(const PNPIDNullTerminatedType&) explicit DirectModeVendorEntry(const PNPIDNullTerminatedType& pnpid) ^ /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:47:22: note: candidate expects 1 argument, 2 provided /home/taylorr/sensics/src/OSVR-RenderManager/osvr/RenderKit/DirectModeVendors.h:45:15: note: candidate: osvr::renderkit::vendorid::DirectModeVendorEntry::DirectModeVendorEntry(const osvr::renderkit::vendorid::DirectModeVendorEntry&)

russell-taylor commented 7 years ago

Fixed by Ryan and merged in 7a20572a1a73c090b57ab0336c45750f9dd3b645