Jump to content
• Advertisement

# Strange include directory ordering issue

This topic is 2776 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

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

##### Share on other sites
Advertisement

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
4. 4
Rutin
12
5. 5
• Advertisement

• 12
• 16
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632659
• Total Posts
3007692
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!