在Windows上编译gosqlite时出现错误。

huangapple go评论84阅读模式
英文:

Error while compiling gosqlite on windows

问题

我试图构建gosqlite以便在Windows下运行我的项目。
不幸的是,在调用gcc时,cgo会抛出一个错误。
我将其简化为以下内容:

$ ../../../../../pkg/tool/windows_386/cgo.exe sqlite.go
fork/exec C:\cygwin\bin\gcc.exe: error 5 (FormatMessage failed with err=15100)

我研究了错误代码并得到了以下结果:
系统错误代码15100意味着“资源加载程序无法找到MUI文件”。此错误代码也可能显示为“ERROR_MUI_FILE_NOT_FOUND”或值0x3AFC。
来源

我的环境是一个全新的win7虚拟机安装,带有cygwin,go1和sqlite3。

我希望能得到帮助,这是我第三天,我正在努力解决这个问题...

谢谢!

英文:

I tried to build gosqlite in order to get my project running under windows.
Unfortunately cgo throws an error while calling gcc.
I broke it down to this:

$ ../../../../../pkg/tool/windows_386/cgo.exe sqlite.go
fork/exec C:\cygwin\bin\gcc.exe: error 5 (FormatMessage failed with err=15100)

I researched the errorcode and got this:
System error code 15100 means "The resource loader failed to find MUI file." This error code may also display as "ERROR_MUI_FILE_NOT_FOUND" or as the value 0x3AFC.
source

My environment is an fresh win7 virtualbox install with cygwin, go1, sqlite3.

I hope for help, it's my third day, I'm trying to solve this ...

with kind regards!

答案1

得分: 1

你得到的cgo错误信息不是很好:

fork/exec C:\cygwin\bin\gcc.exe: error 5 ...

错误5是ERROR_ACCESS_DENIED。我怀疑,cgo尝试运行gcc,但CreateProcess失败并显示ERROR_ACCESS_DENIED。

你应该收到正确的错误信息,但Go无法将"error 5"翻译成消息字符串。它正在寻找"English"消息:

http://code.google.com/p/go/source/browse/src/pkg/syscall/syscall_windows.go#82

但是,我怀疑你的计算机没有这些。如果是这种情况,那么Go应该回退到"native"消息。

如果你在这里创建一个关于错误消息的问题http://code.google.com/p/go/issues/list,也许会有所进展。

Alex

英文:

The error message you got out of cgo is not very good:

fork/exec C:\cygwin\bin\gcc.exe: error 5 ...

error 5 is ERROR_ACCESS_DENIED. I suspect, cgo tried to run gcc and CreateProcess failed with ERROR_ACCESS_DENIED.

You should have received proper error message, but Go could not translate "error 5" into message string. It is looking for "English" message:

http://code.google.com/p/go/source/browse/src/pkg/syscall/syscall_windows.go#82

but, I suspect, you computer do not have these. If that is the case, then Go should fall back to "native" message instead.

If you create an issue about your bad error message here http://code.google.com/p/go/issues/list, maybe something will get done.

Alex

huangapple
  • 本文由 发表于 2012年5月11日 18:11:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/10549433.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定