作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我的所有项目都包含在特定目录中的文件(在我的项目目录中称为 include
)。当我将它们包含在 cpp 文件中时,我需要
#include "include/somefile.h"
我要怎么做才能做到
#include <somefile.h>
?
最佳答案
使用编译器的-I
标志。喜欢:
~$ c++ -Wall -Werror -pedantic -I/home/user/include -c source_file.cpp
关于c++ - 如何在我的 "include path"中放入一些东西?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4218357/
我是一名优秀的程序员,十分优秀!