Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
elect's avatar
elect
Honored Guest
11 years ago

How to build samples

Hi,

I am trying to build sample in order than later having something to compare my java samples to, but I am facing a LOT of problems and I found no guide about building them around (Win7 64b)..

So, sdk 0.2.5 downloaded.

Launching Microsoft Visual C++ 2010 Express by executing OculusSDK/Samples/LibOVR_With_Samples_Msvc2010.sln

LibOVR selected as startup project by default, trying to build that, it works

1>  LibOVR_Msvc2010.vcxproj -> C:\Users\gbarbieri\Documents\OculusSDK\LibOVR\Projects\Win32\../../Lib/Win32/libovrd.lib
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


Trying to build the easiest example now, SensorBoxTest

It fails, it complains because d3dcompiler.h is missing

I try to look on the hd, found under C:\cygwin64\usr\include\w32api.. wtf, cygwin should have nothing to do with it, worth to give it a try anyway, adding that path, building, still failing, I get a lot of unresolved variables.. I guess that was a kind of dummy header maybe

Looking around, here I read that
You can get d3dcompiler.h from either the new DirectX SDK (which comes with the new Windows SDK), or the old DirectX SDK (which comes as a standalone download). By default, the old SDK installs all of the include files to this directory:
Program Files\Microsoft DirectX SDK (June 2010)\Include


I have already the Windows SDK (7.1) but there is no d3dcompiler.h inside, I think maybe it is old or whatever, I download it and reinstall, it is still the 7.1, but still no d3dcompiler.h..
Then I download and install the DirectX SDK, d3dcompiler.h is inside and it seems a default path points already to the right folder, so it founds it.

Building the SensorBox again, it fails

1>------ Build started: Project: SensorBoxTest, Configuration: Debug Win32 ------
1> Platform.cpp
1> Win32_Gamepad.cpp
1> Win32_Platform.cpp
1> Render_Device.cpp
1> Render_D3D10_Device.cpp
1> Render_D3D11_Device.cpp
1> SensorBoxTest.cpp
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


Looking online again for a solution, here they offer 2 solutions, one is just trying to disable incremental linking, I try that, still failing, still same error.. The other solutions involves
install VS2010 SP1.

Edits (@CraigRinger): Note that installing VS 2010 SP1 will remove the 64-bit compilers. You need to install the VS 2010 SP1 compiler pack to get them back.

This affects Microsoft Windows SDK 7.1 for Windows 7 and .NET 4.0 as well as Visual Studio 2010.


Oh god, I really would not like to do all that, so before going on I would like to know if that is the only solution and/or is working and/or someone experienced the same..

1 Reply

  • elect's avatar
    elect
    Honored Guest
    Solved by installing in the order


    Visual Studio 2010 RTM
    Windows SDK 7.1
    Visual Studio 2010 SP1
    Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1


    As stated here