Skip to content

x/sys/windows: compile error with Go 1.11 #34742

@mtolman

Description

@mtolman

What version of Go are you using (go version)?

$ go version go1.11.1 windows/amd64

Does this issue reproduce with the latest release?

not sure

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\mtolman\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\release-trunk\liveconsole-agent;C:\Users\mtolman\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\mtolman\AppData\Local\Temp\go-build937983166=/tmp/go-build -gno-record-gcc-switches

What did you do?

Using x/sys/windows in my project now causes compilation errors when it did not previously.

Here is a sample source file:

package main

import (
	"fmt"
	"golang.org/x/sys/windows"
)

var dll windows.DLL

func main() {
	fmt.Println("help")
}

This used to compile but no longer does. It fails with these errors:

..\golang.org\x\sys\windows\dll_windows.go:21:6: missing function body
..\golang.org\x\sys\windows\dll_windows.go:24:6: missing function body

The issue looks to be caused by this merge:

https://go.googlesource.com/sys/+/ef33b2fb2c414dca4bfcf6ca59cbd1d9ad00703d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions