Martin Spott wrote:

As you know I have limited C/C++ knowledge, but I thought I'd have
at least a little bit  ;-)  Here comes ....
While I'm digging through the sources in the hope to find the cause for
some mislead header includes I wondered about notation of several
include statements. To my knowledge system includes should be bordered
by brackets:

#include <stdio.h>


and your own, private header files by quotation marks:

#include "atis.hxx"


Could someone please explain to me what is different for example in FlightGear/src/ATC/atis.cxx:

#include <simgear/compiler.h>


This is definitely not a system include because it stems from your very
private SimGear installation. What did I miss ?



As I understand it, bracket's vs. double quotes tells the compiler how to search for the include file. If a file is listed in brackets (i.e. #include <stdio.h>) then the compiler searches the standard system include directories like /usr/include, /usr/local/include, /opt/include, and perhaps some deaply buried platform/compiler dependent directories.


If the file is enclosed in double quotes (i.e. #include "atis.hxx") then the compiler just searches the local directory.

MS doesn't really have standard system include directories like unix does, but I assume that brackets would tell the compiler to search through the standard include directories provided by MSVC, where as quotes would tell the compiler to search only the current folder ... not sure about that though ... from the perspective of a unix developer, MSVC does some slightly strange things sometimes. :-)

#include <simgear/compiler.h> is correct form if you've installed simgear in a "standard" location such /usr/local/include

Regards,

Curt.

--
Curtis Olson http://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear Project http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d



_______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to