[vtkusers] " " vs < > for includes

Michael Jackson mike.jackson at bluequartz.net
Thu Nov 19 10:40:24 EST 2009



On Nov 19, 2009, at 10:22 AM, David Doria wrote:

> I noticed that most of the includes are done like this:
> #include "vtkPolyData.h"
>
> Don't the quotes mean "look in the current directory", where
> #include <vtkPolyData.h>
>
> means "look on the PATH"?
>
> If this is correct, shouldn't they all use <> since we want to find
> headers in all of the subdirectories (VTK/Graphics, VTK/Filtering,
> etc), which I assume have been put on a header_path type variable by
> cmake?
>
> It clearly works the way it is and I'm sure it is "correct" since the
> whole project does it like this, I was just curious.
>
> David

<opinion>
	I would _really_ like to see includes done like
#include <VTK/Filtering/vtkDataSet.h>

Which in my mind helps segregate the vtk includes from other includes  
in my source codes, helps me figure out which libraries I need to  
include and makes the compile command line WAY shorter since I don't  
need a bazillion include directories, I need just one for VTK plus any  
others for the 3rd party stuff.
</opinion>

I think as much as I would like the above that there might be issues  
with that setup due to how some scripts generate code... I think..
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



More information about the vtkusers mailing list