包括<的API / API1 / api.h>抛出没有这样的文件或目录 [英] include<apis/api1/api.h> throws No such file or directory
问题描述
#include<apis/api1/api.h>
抛出没有这样的文件或目录
i甚至尝试将api.h和api.cc移动到主项目目录和使用
throws No such file or directory i even tried moving api.h and api.cc to the main project directory and using
#include<api.h>
即使与其他类使用$ b $的目录完全相同bi试图将/ apis / api1添加到编译器搜索路径
中,这只会使编译器崩溃,有人会告诉我应该在编译器编译行中输入什么内容
does the same thing even though it is in the exact same directory that the other classes use i tried adding /apis/api1 to the compiler search path that just crashes the compiler can someone tell me what to type into the compilers compilation line
推荐答案
#include <api.h>
是包含系统标题的方式。 (即,系统上安装的库的头文件。)它在源文件的目录或 -I $ c中指定的目录中搜索 not $ c $>命令行参数。
is the way you include a system header. (That is, the header for a library installed on your system.) It does not search in the directory of the source file or in directories specified in -I
command line arguments.
#include "api.h"
是包含自己标题的方式。 (但它也会搜索库头位置,如果它没有在本地找到头。)
is the way you include your own headers. (But it will also search library header locations if it doesn't find the header locally.)
这篇关于包括<的API / API1 / api.h>抛出没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!