Sign in to follow this  
Rasterman

VC++ Include directories won't work

Recommended Posts

Using visual c++ 2010 express, created a new win32 console project. Added C:\Dev\Common to projects include path, the compiler then cannot find any files in the include path. If I reference them directly it works fine (example C:\Dev\Common\array.h) but doing just "array.h" doesn't work, compiler gives me error C1083: Cannot open include file: 'array.h': No such file or directory

I have tried using <array.h> instead of "array.h" and still does the same thing.

The insane part of all of this is I have another project in the solution that is using the EXACT SAME INCLUDE DIRECTORY AND FILES and it works just fine, WTF!!! Things like this drive me insane, wasting even a minute on this is a total waste of time, anyone have any recommendations? I am about ready to throw my keyboard through the window...

Share this post


Link to post
Share on other sites
ok creating a new solution and new project doesn't work either, i have no idea why the first solution with the first project is working and no others with the exact same files and include directory settings.

another thing i discovered, when right clicking on the file in the editor, it does find and open the file just fine.

Share this post


Link to post
Share on other sites
Found the solution, after changing the Include Directories property you have to unload and reload the entire solution for it to pickup any changes, only doing a rescan on the solution doesn't work. Wow! Yet another reason I [b]hate [/b]VS2010...

Share this post


Link to post
Share on other sites
[quote name='Rasterman' timestamp='1307471576' post='4820616']
Found the solution, after changing the Include Directories property you have to unload and reload the entire solution for it to pickup any changes, only doing a rescan on the solution doesn't work. Wow! Yet another reason I [b]hate [/b]VS2010...
[/quote]
I've never had to do reload the solution OR "rescan" it.... are you making your changes through the properties window, or directly to the vcxproj file?

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