Skip to content

Instantly share code, notes, and snippets.

@her001
Last active June 5, 2016 12:03
Show Gist options
  • Select an option

  • Save her001/e1c4264c71b9f28cdd9ab772e4707f6f to your computer and use it in GitHub Desktop.

Select an option

Save her001/e1c4264c71b9f28cdd9ab772e4707f6f to your computer and use it in GitHub Desktop.
Patch to allow OSVR-Vive to compile on Linux (proper fix available here: https://github.com/ValveSoftware/openvr/pull/58)
--- a/vendor/openvr/headers/openvr_driver.h 2016-05-31 23:20:57.457776648 -0500
+++ b/vendor/openvr/headers/openvr_driver.h 2016-05-31 23:26:23.908363307 -0500
@@ -859,15 +859,15 @@
#pragma pack( pop )
// figure out how to import from the VR API dll
-#if defined(_WIN32)
+//#if defined(_WIN32)
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __declspec( dllexport )
-#else
-#define VR_INTERFACE extern "C" __declspec( dllimport )
-#endif
+//#ifdef VR_API_EXPORT
+//#define VR_INTERFACE extern "C" __declspec( dllexport )
+//#else
+//#define VR_INTERFACE extern "C" __declspec( dllimport )
+//#endif
-#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)
+//#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__)
#ifdef VR_API_EXPORT
#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
@@ -875,9 +875,9 @@
#define VR_INTERFACE extern "C"
#endif
-#else
-#error "Unsupported Platform."
-#endif
+//#else
+//#error "Unsupported Platform."
+//#endif
#if defined( _WIN32 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment