Sign in to follow this  

Problem referencing DirectX in managed C++ project

This topic is 2628 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm trying to reference the Microsoft.DirectX and Direct3D assemblies in a managed C++ project in .NET framework 3.5. I've verified that those files are located in C:\windows\assembly\gac. The version it shows for both assemblies is 1.0.2902.0. I use DirectX from another C# project all the time, so I'm absolutely sure DirectX is installed properly.

When I add
#using <Microsoft.DirectX.dll>
to a header file in the managed C++ project, I get
fatal error C1107: could not find assembly 'Microsoft.DirectX.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
I can reference other assemblies, for instance
#using <System.Windows.Forms.dll>
works fine, so I think the path is fine. Apart from that, wouldn't it always look in the windows path?

I also tried editing the project properties, Common Properties -> Framework and Properties -> Add New Reference, but the only tab I see there is Projects, but no .NET tab.

What the heck is going on?

- Lutz

Share this post


Link to post
Share on other sites
I could be wrong but as far as i remember the libs are in C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0

this is what i use for my vb.net apps, hope this helps.
and im not sure , but for unmanaged dx you have to set the include and lib dir's for the dx sdk.

Share this post


Link to post
Share on other sites

This topic is 2628 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this