PDA

View Full Version : Visual C++ will not import headers



Al6200
January 11th, 2007, 05:44 PM
In an empty file, with the code:

#include "windows.h"
#include "stdafx.h"
#include "d3d.h"

I get the error "Cannot open objbase.h".

If I remove the last line, there is no error. I've gone into settings and set the DirectX/include file as a directory for includes.

WHY?!?!?!?

I HAVE NO PROBLEMS WITH MANAGED DIRECTX!

WHY?!?!?!?!?!?

MTsoul
January 11th, 2007, 10:04 PM
When I included my Direct3D header, I had to specify a version after the name. For example, "d3d8.h".

But what your thing means is d3d.h includes objbase.h, but that can't be found. So it must be d3d.h's fault.

Al6200
January 11th, 2007, 10:47 PM
Are you saying my DirectX include files are corrupted, compadre?

Or is it that I need to mess with options to that the headers can find DLLs or something.

MTsoul
January 13th, 2007, 02:30 PM
Try including the version specific file of the header. If you are using Direct3D 9, include d3d9.h instead.