Solve the problem of link: fatal error LNK1104: unable to open the file “d3dx9. Lib”

Solve the problem of link: fatal error LNK1104: unable to open the file “d3dx9. Lib”

First install the microsoft directx SDK (June 2010). The installation package name is DXSDK_ Jun10. Exe,
microsoft directx SDK 2010 version download http://www.microsoft.com/en-us/download/details.aspx?id=6812
Version:
Date Published:
9.29.1962
6/7/2010
File name:
File size:
DXSDK_ Jun10. exe
571.7 MB

 

If there is an error before the installation is completed, uninstall 86 and x64 redistributions of VC + + 2010 in the computer (10.0.xxx, XXX higher than 30319 is probably this number. As long as it is higher than this version, the installed 86 and x64 redistributions of VC + + 2010 must be deleted),

Reinstall the microsoft directx SDK (June 2010) again and the installation will be successful

Then select release from the drop-down box next to the compile button, and click the green compile button on the right side of Win32. If an error is reported at this time, it says that d3d9x cannot be found Lib
select the project name in the left column, right-click to open the lowest project – properties – configuration properties – VC + + directory, or directly press Alt + F7 to open the VC + + directory setting window
add these two paths to the beginning of the containing directory and Library Directory respectively, and be sure to separate them with semicolons and subsequent paths,

Include directory: D: \ program files (x86) \ microsoft directx SDK (June 2010) \ include
Library Directory: D: \ program files (x86) \ microsoft directx SDK (June 2010) \ lib \ x86;

Because:
d3dx9 Lib and d3d9 Lib is located in D: \ program files (x86) \ microsoft directx SDK (June 2010) \ lib \ x86 directory
d3d9 H (header file of Direct3D) is located in D: \ program files (x86) \ microsoft directx SDK (June 2010) \ include directory

Note that the premise of this setting is that the microsoft directx SDK (June 2010) must be installed in D: \ program files (x86) \ microsoft directx SDK (June 2010)

Select debug from the drop-down box next to the compile button and click the compile green button on the right side of Win32. Generally, no error will be reported because these two paths already exist in the include directory and Library Directory of the project – properties – configuration properties – VC + + directory

Similar Posts: