Jump to content
  • Advertisement
Sign in to follow this  
Ripiz

Visual Studio include issue

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

Hello,

I am using Visual Studio 2012 RC (pretty much same as Visual Studio 2010) and I'm having some issues with includes. Never really understood how they work, always having problems, sadly. I have 3 projects
Project1 include paths: "." (project's directory, some files are in folders and it causes a lot include errors)
Project2 include paths: "..\Project1" (first project's directory)
Project3 include paths: ".." (solution directory)

Project2 includes some files from Project1:
#include <File1.h>

Project3 includes some files from Project2:
#include <Project2\File2.h> // we have solution folder in include list, gotta specify project folder

Everything seems fine, but when I try to compile Project3, it cannot find Project1 includes, which are included in Project2.
Adding include path for Project1 in Project3 seems wrong, as I'm not using it directly. I hoped someone could help me out to sort this.

Thank you in advance. Edited by Ripiz

Share this post


Link to post
Share on other sites
Advertisement
Feels wrong, as Project3 isn't using Project1 directly, but oh well. Thanks...

Share this post


Link to post
Share on other sites
If Project3 needs Project1's include file it kinda is using it directly. Rewrite the code so that Project2\File2.h doesn't include File1.h (try to write it so you can include it from File2.cpp instead).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

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!