Sign in to follow this  
RonHiler

Strange include directory ordering issue

Recommended Posts

Hey all,

After much gnashing of teeth, wailing, and general hair pulling, I finally got my program to compile. But it required a strange setup of the include directories. And I'm not sure why.

My solution has three projects in it so far. The main one is sitting at:

D:\Enzyme\Trunk\Engine

This one compiles just fine.

Then there is a second project, which is a DLL, sitting at:

D:\Enzyme\Trunk\Engine\Tools\FontBuilder

Okay? The third is of no consequence to this problem.

My issue with the DLL project is that I couldn't get it to compile. I was getting ALL SORTS of really weird errors that made no sense. Well, as I said, I finally got it fixed, but ONLY by putting in a very odd ordering of the include directories for this particular project.

The DLL project needs to pull .h files from the engine directory, so I added "..\.." to the VC++ Directories->Include Directories entry. And that is where my problems began. I also had the "Inherit from Parent or Project Defaults" checkbox checked. And this was giving me all sorts of grief.

I finally discovered to compile the project, I had to put the order of the include directories in this EXACT order.

C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;
$(VCInstallDir)include;
$(VCInstallDir)atlmfc\include;
$(WindowsSdkDir)include;
$(FrameworkSDKDir)\include;
..\..;

The middle four lines being the project defaults. Specifically, it's the line
$(WindowsSdkDir)include;
that has to come prior to the line
..\..;

If those two are in reverse order, I get those strange errors. Why should that be? There is nothing in the engine directory in terms of .h files that would conflict with what is in the Windows SDK directory (at least, none that I could see).

So what gives? Why the order dependency?

Share this post


Link to post
Share on other sites

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