<分区>
Possible Duplicate:
What is the difference between #include <filename> and #include “filename”?
include “file.h” vs <file> what is the difference?
我在使用外部库时遇到过几次,我认为这纯粹是因为我没有经验。正如标题所说,我的问题是在 include 和 ""中使用 <> 有什么区别,这显然是一个很大的问题,因为你不能用 <> 包含你自己的标题,但你可以用 "",反之亦然你可以'不包括标题,例如 <string>
用“”。
我目前正在使用 Crystal Space SDK,我正在努力掌握它并按照教程进行操作。我在遵循 Creating-External-MSVC-Application Howto 指南时遇到了这个错误:
1>------ Build started: Project: NewDawn, Configuration: Debug Win32 ------
1> simple1.cpp
1>f:\project\newdawn\newdawn\include\cs\csplatform.h(26): fatal error C1083: Cannot open include file: 'csutil/win32/csconfig-msvc.h': No such file or directory
1> main.cpp
1>f:\project\newdawn\newdawn\include\cs\csplatform.h(26): fatal error C1083: Cannot open include file: 'csutil/win32/csconfig-msvc.h': No such file or directory
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
我去找文件 csplatform.h,发现它包含文件 csconfig-msvc.h 使用 < >:
#if defined (CS_WIN32_CSCONFIG)
/* Use manually maintained settings when not building on environments not
* using configure (specifically, MSVC) */
# include <csutil/win32/csconfig-msvc.h>
#else
# include <csconfig.h>
#endif
理论上我可以将 #include csutil/win32/csconfig-msvc.h 从 < > 更改为 ""但我不应该这样做,这是一个完善的代码库,最简单的教程应该可以直接使用盒子。
我想知道为什么它使用 < > 而不是 ""。如果我没记错的话,我也看到 Boost 这样做了。