Kagami/go-face

cant run functions ("undefined 1.2"), need to update face.go?

slicken opened this issue · 9 comments

Hi,

I have followed the steps in doc , downloaded all test data and tries to buld / run the main.go test
but I am getting this error and cant fix it.

slk@slk-pc:~/go/slicken/face-detect$ go build -o app
face-detect
./main.go:24:19: undefined: face.NewRecognizer
./main.go:45:21: undefined: face.Descriptor

the newer versions cant run any functions in face.go
i tried many things, like edot go.mod and set version 1.14
it does not work even if i rename the whole face to main and run main.go in repo dir.

todays version, I maby need to 'go build' with adition flags ?
or something is wrong with face.go at the top of file i think.

change your import to:

import ( goFace "github.com/Kagami/go-face" )

and call:

rec, err := goFace.NewRecognizer(Path)

change your import to:

import ( goFace "github.com/Kagami/go-face" )

and call:

rec, err := goFace.NewRecognizer(Path)

tries that, and it didnt work. same error with GoFace name istead

it doesnt even work if rename package name to main, and rename example file to main.go and call NewReconizer directly without any face. or GoFace. infront of it.. it still cant run the function..

see https://github.com/leandroveronezi/go-recognizer/tree/master/examples

does not work

lk@slk-pc:~/go/slicken/go-recognizer/examples$ go build -o app
# github.com/leandroveronezi/go-recognizer
../../../pkg/mod/github.com/leandroveronezi/go-recognizer@v1.0.0/recognizer.go:16:20: undefined: goFace.Descriptor
../../../pkg/mod/github.com/leandroveronezi/go-recognizer@v1.0.0/recognizer.go:31:20: undefined: goFace.Recognizer
../../../pkg/mod/github.com/leandroveronezi/go-recognizer@v1.0.0/recognizer.go:48:21: undefined: goFace.NewRecognizer
...
...

maby i some buildflags for the C code to work?

Same problem. Author abandoned the product?

Same problem...

i found solution.
CGO_ENABLED must be set.

go env -w CGO_ENABLED="1"

resolved