Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何向Sublime添加额外的include/lib路径(使用gcc编译纯C)_C_Gcc_Sublimetext3_Sublimetext - Fatal编程技术网

如何向Sublime添加额外的include/lib路径(使用gcc编译纯C)

如何向Sublime添加额外的include/lib路径(使用gcc编译纯C),c,gcc,sublimetext3,sublimetext,C,Gcc,Sublimetext3,Sublimetext,我打算按如下方式添加崇高的构建: { "cmd": ["gcc -Wall ${file} -o ./bin/${file_base_name} -I${file_path}/lib && ./bin/${file_base_name}"], "selector": "source.c", "working_dir": "${file_path}", "shell": true, "variants": [ { "name": "Run",

我打算按如下方式添加崇高的构建:

{
"cmd": ["gcc -Wall ${file} -o ./bin/${file_base_name} -I${file_path}/lib && ./bin/${file_base_name}"],
"selector": "source.c",
"working_dir": "${file_path}",
"shell": true,


"variants": [
    {
        "name": "Run",
        "cmd": ["gcc -Wall ${file} -o ./bin/${file_base_name} -I${file_path}/lib && open ./bin/${file_base_name}"],
        "working_dir": "${file_path}",
        "shell": true

    }
 ]

}
但我没有向这个“新构建系统”添加额外的include和libraries路径。请帮帮我,非常感谢

如果我使用简单C文件进行测试,则可以消除其他问题:

如果我想添加额外的“include”,我会得到“致命错误:pcap.h:没有这样的文件或目录”

…尽管我已经将这个额外的“包含”路径添加到了系统环境路径,并且所讨论的文件已经存在,正如您从图片中看到的那样


实际命令是什么样子的?您收到了什么错误消息?谢谢,我已经添加了带有图片的错误消息。如果您查看第二个屏幕截图中的
shell\u cmd
,则没有包含选项。我不知道它为什么没被捡起来。谢谢。我放弃了,转而使用Dev++和CodeLite。