openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Fixed include problems and compilation errors

Open Maniform opened this issue 4 years ago • 2 comments

  • Replaced bad include definitions
  • Define Format function as a Windows only
  • Removed AssertMsg and include assert which causes problems

I tested to compile on Windows 10 and Ubuntu 21.04 and it worked on both of them. I've noticed a bit too late that an other quite similar pull request has been asked here : [https://github.com/ValveSoftware/openvr/pull/1524]. I don't know if it's a problem or not.

Maniform avatar Jun 04 '21 14:06 Maniform

assert.h includes are not handled the best way, those asserts still serve a purpose and just removing them is not the best idea, but adding assert.h into vrcommon would break standard library assert.h includes. So either add a file like assert<suffix>.h and in it define a simple print on assert function using static assert from the standard library assert.h OR Add assert.h but define a full fledged AssertMsg in it and add a define for assert since it is used in jsoncpp.cpp

okawo80085 avatar Aug 27 '21 15:08 okawo80085

Also you missed a stdarg.h include in strtools_public.cpp

okawo80085 avatar Aug 27 '21 15:08 okawo80085