Skip to content

unable to compile go-opencv code #48

@danoctavian

Description

@danoctavian

Compilation of the the code you give as an example:

https://github.com/lazywei/go-opencv#opencv2s-initcameramatrix2d

fails with a large set of errors that look like this:

/tmp/go-build235271592/github.com/lazywei/go-opencv/gocv/_obj/gocv_calib3d.cpp.o: In function GcvRodrigues_(cv::Mat, cv::Mat&)': /usr/include/opencv2/core/core.hpp:3925: undefined reference to cv::noArray()'
/tmp/go-build235271592/github.com/lazywei/go-opencv/gocv/_obj/gocv_calib3d.cpp.o: In functionGcvRodrigues_(cv::Mat, cv::Mat&)': go_workspace/src/github.com/lazywei/go-opencv/gocv/gocv_calib3d.cpp:54: undefined reference to cv::_OutputArray::_OutputArray(cv::Mat&)'

It looks like linking doesn't work properly. I don't understand how this interacts with how golang builds things.

i performed the following steps on an ubuntu-14.04 running on a 64 bit machine.

go get github.com/lazywei/go-opencv
sudo apt-get install libopencv-dev

Is there a solution for this?

Thanks!
Dan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions