Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS Visual Studio Project header files

I am fairly new to developing C/C++ code in MSVS but one of the things that has already confused me is why, after adding a set of source and header files to my project such that they show up respectively under the MSVS folders 'Source Files' and 'Header Files', do I subsequently have to tell the compiler where my header files are under 'Project->properties->C/C++->General'. It seems to me that MSVS should already attempt to resolve any 'include "..."' statements by first looking thru the set of header files I have included in the project.

Anybody care to comment on the logic being used here?

Thanks, Travis

like image 291
Travis Avatar asked Feb 05 '10 14:02

Travis


1 Answers

The project files are used by the IDE to keep track of your files, but the compiler doesn't have access to that information. The include file path is passed to each source file when it compiles.

like image 190
Mark Ransom Avatar answered Sep 18 '22 00:09

Mark Ransom