Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgo: unable to find value for constant #23472

Closed
pmuetschard opened this issue Jan 18, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@pmuetschard
Copy link

commented Jan 18, 2018

Please answer these questions before submitting your issue. Thanks!

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

Built at head.

Does this issue reproduce with the latest release?

No, 1.9 does not have this issue.

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

64bit Windows

What did you do?

Compiling the below snippet fails on Windows (using mingw gcc) and prints:

> go.exe build hello
# hello
src\hello\main.go:18:14: unable to find value of constant C.BAR
package main

/*
typedef enum foo_t {
	FOO,
	BAR,
	BAZ
} foo;
*/
import "C"

import (
	"fmt"
)

func main() {
	fmt.Println(C.BAR)
}
@pmuetschard

This comment has been minimized.

Copy link
Author

commented Jan 18, 2018

never mind, this appears to be due to changes I had made. Sorry.

@golang golang locked and limited conversation to collaborators Jan 18, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.