-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cgo: undefined reference to SINGLE function #40512
Comments
It seems like you figured out the issue: shanduur/gocv@6ea7213 |
For posterity, the issue was features2d.h declared:
but features2d.cpp defined:
C++ allows function overloading, so the compiler treats this as a definition of a separate function from the one declared as |
Yup, figured this out, it was my mistake. Thanks for help! |
In the future, if you discover the root cause of an issue like this, it would be polite to update the issue with those further details. I spent a fair bit of time investigating and struggling to reproduce this issue before discovering you'd already fixed it. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Little bit of backstory:
features2d.go
), and they are working as they should.To reproduce the problem, install my fork of GoCV (for example with
make install
after performinggo get
inside GoCV src folder) and try to runcmd/hello-sift/main.go
file onfeatures2d/drawMatches
branch.What did you expect to see?
Working program, without compilation problem.
What did you see instead?
The text was updated successfully, but these errors were encountered: