简体   繁体   English

如何在 GCC C++ 中添加包含路径

[英]How Can I Add An Include Path in GCC C++

I can add include paths in Visual Studio easily but I couldn't find a way to do it in GCC?我可以在 Visual Studio 中轻松添加包含路径,但在 GCC 中找不到方法? Any helps please?请问有什么帮助吗?

gcc is a command-line program, the flag for includes is -I gcc是一个命令行程序, includes的标志是-I

gcc -IC:\AdditionalIncludeDirectory <other-flags>

Use the -I command-line argument:使用-I命令行参数:

gcc -Ipath

There are many options related to the search of the include files.有许多与搜索包含文件相关的选项。 The most common used is -I path最常用的是-I路径

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM