Please help, trying to get directx up and running in a managed project of c++

I only added the references of Mocrosoft.Directx and direct3d but when I try to compile i get errors:

c:\Projects\Orbital Calc\Physics.h(40): error C3635: 'Microsoft.DirectX.PrivateImplementationDetails::IDirect3DDevice9': undefined native type used in 'Microsoft::DirectX::Direct3D::Device'; imported native types must be defined in the importing source code

and so on...

do I need to include any libraries or includes   I thought I could just use the references

thanks,

Devin



Answer this question

Please help, trying to get directx up and running in a managed project of c++

  • wd

    OK I know I'm replying to myself but, I figured out so far that if I use the following in my form1.cpp file I'm ok, but if I use it in my form header file (form1.h) it gives the errors I'm experiencing...

    namespace Microsoft
       {
       namespace DirectX
          {
          namespace PrivateImplementationDetails
             {
             #include <d3d9.h>
             }
          }
       }
    using namespace Microsoft::DirectX;
    using namespace Microsoft::DirectX::Direct3D;

    Anybody know why this is a standard blank project.


  • sxtn

    Tom Miller wrote something about that problem.

    http://blogs.msdn.com/tmiller/archive/2004/10/05/238317.aspx

    Hope it helps.



  • Dr Adrian Colquhoun

    Cool, thanks.  So I added his stuff and I still get errors.  I've been trying for weeks to incorperate dx into my project without success :(  I've even started blank project and it still wont compile.

  • Kartit

    Question: in Tom's blog it says to do the following to use the include...

    namespace Microsoft
    {
        namespace DirectX
        {
            namespace PrivateImplementationDetails
            {
                #include <d3d9.h>
            }
        }
    }

    But when I do this it redefines the namespaces that I use to perform my dx tasks.  So after the above statement I can't access anything in the original Microsoft.DirectX namespace.

    What should I do to access that stuff

    Thanks,

    Devin


  • pawlu

    Which SDK do you have installed

  • addor

    Aug 2005.  Perhaps I can attach my project or something Thanks for your help!!!
  • Please help, trying to get directx up and running in a managed project of c++