访问被拒绝执行已编译的程序 [英] Access denied executing compiled program

查看:60
本文介绍了访问被拒绝执行已编译的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Windows,我的Hello World代码在 src \ hello \ hello.go 中.

Using Windows, my Hello World code is in src\hello\hello.go.

使用命令"go run hello.go"时遇到这样的错误

When using the command "go run hello.go" Getting Error like this

# command-line-arguments


C:\go\pkg\tool\windows_amd64\link.exe: cannot create $WORK\b001\exe\a.out.exe: open $WORK\b001\exe\a.out.exe: Access is denied.

推荐答案

这可能是由AVG或G-Data等防病毒应用程序引起的.

This can be caused by an anti-virus application like AVG or G-Data.

您可以将 -o 参数与 go run 一起使用,以指定输出目录,并将该路径添加到防病毒的排除列表中(如果该路径是原因.

You can use the -o argument with go run to specify the output directory, and add that path to the exclude list of your anti-virus should this be the cause.

这篇关于访问被拒绝执行已编译的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆