include<apis/api1/api.h> throws No such file or directory

倖福魔咒の 提交于 2019-12-13 09:55:22

问题


#include<apis/api1/api.h> 

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> 

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


回答1:


#include <api.h>

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.)



来源:https://stackoverflow.com/questions/29019881/includeapis-api1-api-h-throws-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!