directx9 lib error

hi all
i have problems with directx9 lib's.
i have started programing with directx8 and now directx9. the problem is that when i am trying to use directsound i get errors like:
Sound.obj : error LNK2001: unresolved external symbol _IID_IMediaPosition
Sound.obj : error LNK2001: unresolved external symbol _IID_IMediaControl
Sound.obj : error LNK2001: unresolved external symbol _CLSID_FilterGraph
Sound.obj : error LNK2001: unresolved external symbol _IID_IGraphBuilder
Debug/Unrevealed.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
i have had similar problems but i solved them with this


#pragma comment(lib, "d3dx9.lib");
#pragma comment(lib, "d3d9.lib");
#pragma comment(lib, "Dxguid.lib");
#pragma comment(lib, "Strmiids.lib");

tnx




Answer this question

directx9 lib error

  • Telmo Sampaio

    If you are programming w/ C++, try adding winmm.lib to your project and be sure to #include it in the files where your sound code is.


  • misogidave

    Yes i too think same



  • jhall

    We all get this 'unresolved external symbol' error at some point. Typically, this meams that your project isn't linked to DLLs which you have referenced or the compiler doesn't have the correct path to the directory in which these referenced DLLs reside. The solution is simple: open the property pages for your project in the Solution Explorer. Then select the Linker folder and add to the command line the names of the LIB files that are required. The compiler must also know where to search for these files.
    Maybe this will be helpful:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/vsintro7/html/vxurfvcdirectoriesprojectsoptionsdialogbox.asp

  • directx9 lib error