gpt4 book ai didi

c++ - Scite: "Go"未运行已编译和构建的代码,给出 "not recognized"错误

转载 作者:行者123 更新时间:2023-11-28 08:01:47 24 4
gpt4 key购买 nike

“Go”功能是 Scite 给我以下错误

"'.'不被识别为内部或外部命令,可运行的程序或批处理文件。”

是'.'试图与路径相关?

我编译和构建没有问题。构建的 exe 文件也可以。我只是使用了一个简单的 hello world 代码:

int main()
{

cout << "Hello " ;
return 0;
}

感谢您的帮助。

最佳答案

这是因为 scite 在生成的输出文件之前使用“./”来执行程序,这是我们通常在“终端”(linux) 中执行程序的方式。然而,这在 Windows 中不是必需的,我们只需指定输出名称并按回车键即可执行“.exe”文件。

您需要在选项菜单中打开 cpp.properties 并查找以下内容:

# C++ styles   

评论下

# Braces are only matched in operator style  

编辑行

command.go.*.c=./$(FileName)  

删除'./'。做到这一点

command.go.*.c=$(FileName)  

在下面的评论下面再次重复同样的事情:

# To make the Go command both compile (if needed) and execute, use this setting:  
#command.go.needs.*.c=gcc $(ccopts) -std=c99 $(FileNameExt) -o $(FileName)

改变

command.go.*.c=./$(FileName)  

command.go.*.c=$(FileName)  

'制作'设置

如果您使用的是 mingW-gcc,则在 mingW-gcc 安装文件夹中查找“make”程序。那应该是'mingw32-make'。评论下方:

# Braces are only matched in operator style  

改变

make.command=make  

make.command=mingw32-make   

关于c++ - Scite: "Go"未运行已编译和构建的代码,给出 "not recognized"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11258429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com