You don't have to link -lyaml, just fix the declarations.
diff --git a/decode.go b/decode.go index 6f209f4..b5046c5 100644 --- a/decode.go +++ b/decode.go
@@ -1,7 +1,6 @@ package goyaml // #cgo LDFLAGS: -lm -lpthread -// #cgo windows LDFLAGS: -L. -lyaml // #cgo windows CFLAGS: -DYAML_DECLARE_STATIC=1 // #cgo CFLAGS: -I. -DHAVE_CONFIG_H=1 //