Compiling a dll with g++
<p>I've been trying to compile this projet on windows with g++:
<a href="https://github.com/newhouseb/openvr-c" rel="nofollow">https://github.com/newhouseb/openvr-c</a></p>

<p>My command lines: </p>

<pre><code>g++ -c  -std=gnu++0x -DBUILDING_OPENVR_C openvr_c.cpp openvr_c.h
g++ -shared -o openvr_c.dll openvr_c.o  -std=gnu++0x -Wl,--out-implib,openvr_api.dll -L. -lopenvr_api
</code></pre>

<p>When i run the second line i get these errors:</p>

<blockquote>
  <p>openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext10CheckClearEv[__ZN2vr14COpenVRContext10CheckClearEv]+0x12):
  undefined reference to <code>_imp__VR_GetInitToken'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext10CheckClearEv[__ZN2vr14COpenVRContext10CheckClearEv]+0x33):
  undefined reference to</code>_imp__VR_GetInitToken'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext8VRSystemEv[__ZN2vr14COpenVRContext8VRSystemEv]+0x2b):
  undefined reference to <code>_imp__VR_GetGenericInterface'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext11VRChaperoneEv[__ZN2vr14COpenVRContext11VRChaperoneEv]+0x2c):
  undefined reference to</code>_imp__VR_GetGenericInterface'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext16VRChaperoneSetupEv[__ZN2vr14COpenVRContext16VRChaperoneSetupEv]+0x2c):
  undefined reference to <code>_imp__VR_GetGenericInterface'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext12VRCompositorEv[__ZN2vr14COpenVRContext12VRCompositorEv]+0x2c):
  undefined reference to</code>_imp__VR_GetGenericInterface'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext9VROverlayEv[__ZN2vr14COpenVRContext9VROverlayEv]+0x2c):
  undefined reference to <code>_imp__VR_GetGenericInterface'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr14COpenVRContext14VRRenderModelsEv[__ZN2vr14COpenVRContext14VRRenderModelsEv]+0x2c):
  more undefined references to</code>_imp__VR_GetGenericInterface' follow
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr7VR_InitEPNS_12EVRInitErrorENS_18EVRApplicationTypeE[__ZN2vr7VR_InitEPNS_12EVRInitErrorENS_18EVRApplicationTypeE]+0x23):
  undefined reference to <code>_imp__VR_InitInternal'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr7VR_InitEPNS_12EVRInitErrorENS_18EVRApplicationTypeE[__ZN2vr7VR_InitEPNS_12EVRInitErrorENS_18EVRApplicationTypeE]+0x4c):
  undefined reference to</code>_imp__VR_IsInterfaceVersionValid'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr7VR_InitEPNS_12EVRInitErrorENS_18EVRApplicationTypeE[__ZN2vr7VR_InitEPNS_12EVRInitErrorENS_18EVRApplicationTypeE]+0x61):
  undefined reference to <code>_imp__VR_ShutdownInternal'
  openvr_c.o:openvr_c.cpp:(.text$_ZN2vr11VR_ShutdownEv[__ZN2vr11VR_ShutdownEv]+0x7):
  undefined reference to</code>_imp__VR_ShutdownInternal' collect2.exe:
  error: ld returned 1 exit status</p>
</blockquote>

<p>I don't understand what are these errors,</p>

<p>Can someone enlighten me ?</p>