DirectX

  • Thread starter Thread starter Junaid Hussain
  • Start date Start date
J

Junaid Hussain

Hi,
I am thinking about developing a 3D pool game in C# using DirectX, however
when I compile a C# at the command prompt using; csc PoolGame.cs , I get the
following error message;

The type or namespace name 'DirectX' does not exist in the class or
namespace 'Microsoft' (are you missing an assembly reference?)

Im not sure why it says this because I have DirectX 9.0 installed ??

Thanks in advance,
Junaid
 
Hi,
I do have DirectX 9.0 SDK installed but I still get the error message. Any
ideas?

Regards,
Junaid
 
Hello

You have to reference the Managed DirectX assemblies using the /reference
command line option if you are using the command line compiler, or by adding
a reference to your project if using visual studio.

Best regards,
Sherif
 
Thanks v.much Sherif,

I managed to find the location of the DirectX assemblies and used the
/reference option to make use of them and now I dont get the error. I have
just one more question now. How can I add these assemblies to my classpath
or somehow automate the process of referncing these assemblies because at
the moment I have to type the following;

csc /reference:C:\WINDOWS\assembly\GAC\Microsoft.DirectX\...
\Microsoft.DirectX.dll
/reference:C:\WINDOWS\assembly\GAC\Microsoft.DirectX.Direct3D\...
\Microsoft.DirectX.Direct3D.dll Vertices.cs

Thanks once again for your time and help.
Junaid
 
Back
Top