I had try it, but it didn't work with "Go bindings for OpenCV / 2.x API",
macbookpro:gocv fredlee$ go build -x WORK=/var/folders/34/z2z_vp1573g5014m8k7wys100000gn/T/go-build392930293 mkdir -p $WORK/github.com/lazywei/go-opencv/gocv/_obj/ mkdir -p $WORK/github.com/lazywei/go-opencv/ cd /Users/fredlee/Documents/开发/go/workspace/src/github.com/lazywei/go-opencv/gocv pkg-config --cflags opencv opencv pkg-config --libs opencv opencv swig -version cd $WORK /usr/local/go/pkg/tool/darwin_amd64/compile -o ./github.com/lazywei/go-opencv/gocv/_obj/_go_.o -trimpath . -p main -complete -buildid 8fa91816c0fa30da71edefbe5680e07f9132cbc4 -D _$WORK ./swig_intsize.go cd /Users/fredlee/Documents/开发/go/workspace/src/github.com/lazywei/go-opencv/gocv swig -go -cgo -intgosize 64 -module gocv -o $WORK/github.com/lazywei/go-opencv/gocv/_obj/gocv_wrap.cxx -outdir $WORK/github.com/lazywei/go-opencv/gocv/_obj/ -I/usr/local/Cellar/opencv/2.4.13.2/include/opencv -I/usr/local/Cellar/opencv/2.4.13.2/include -c++ gocv.swigcxx # github.com/lazywei/go-opencv/gocv gocv_core.i:121: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:129: Warning 503: Can't wrap 'operator CvSize' unless renamed to a valid identifier. gocv_core.i:130: Warning 503: Can't wrap 'operator CvSize2D32f' unless renamed to a valid identifier. gocv_core.i:121: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:129: Warning 503: Can't wrap 'operator CvSize' unless renamed to a valid identifier. gocv_core.i:130: Warning 503: Can't wrap 'operator CvSize2D32f' unless renamed to a valid identifier. gocv_core.i:121: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:129: Warning 503: Can't wrap 'operator CvSize' unless renamed to a valid identifier. gocv_core.i:130: Warning 503: Can't wrap 'operator CvSize2D32f' unless renamed to a valid identifier. gocv_core.i:156: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:170: Warning 503: Can't wrap 'operator CvRect' unless renamed to a valid identifier. gocv_core.i:40: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:45: Warning 503: Can't wrap 'operator CvPoint' unless renamed to a valid identifier. gocv_core.i:46: Warning 503: Can't wrap 'operator CvPoint2D32f' unless renamed to a valid identifier. gocv_core.i:47: Warning 503: Can't wrap 'operator Vec<int,2>' unless renamed to a valid identifier. gocv_core.i:40: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:45: Warning 503: Can't wrap 'operator CvPoint' unless renamed to a valid identifier. gocv_core.i:46: Warning 503: Can't wrap 'operator CvPoint2D32f' unless renamed to a valid identifier. gocv_core.i:47: Warning 503: Can't wrap 'operator Vec<float,2>' unless renamed to a valid identifier. gocv_core.i:40: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:45: Warning 503: Can't wrap 'operator CvPoint' unless renamed to a valid identifier. gocv_core.i:46: Warning 503: Can't wrap 'operator CvPoint2D32f' unless renamed to a valid identifier. gocv_core.i:47: Warning 503: Can't wrap 'operator Vec<double,2>' unless renamed to a valid identifier. gocv_core.i:82: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:86: Warning 503: Can't wrap 'operator CvPoint3D32f' unless renamed to a valid identifier. gocv_core.i:88: Warning 503: Can't wrap 'operator Vec<int,3>' unless renamed to a valid identifier. gocv_core.i:82: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:86: Warning 503: Can't wrap 'operator CvPoint3D32f' unless renamed to a valid identifier. gocv_core.i:88: Warning 503: Can't wrap 'operator Vec<float,3>' unless renamed to a valid identifier. gocv_core.i:82: Warning 503: Can't wrap 'operator =' unless renamed to a valid identifier. gocv_core.i:86: Warning 503: Can't wrap 'operator CvPoint3D32f' unless renamed to a valid identifier. gocv_core.i:88: Warning 503: Can't wrap 'operator Vec<double,3>' unless renamed to a valid identifier. gocv_core.i:241: Warning 516: Overloaded method cv::Mat::diag(cv::Mat const &) ignored, gocv_core.i:239: Warning 516: using cv::Mat::diag() const instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >() const ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >() instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int) ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int) const instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int const *) const ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int const *) instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int) const ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int) instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(cv::Point) const ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >(cv::Point) instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int,int) const ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int,int) instead. gocv_core.i:279: Warning 516: Overloaded method cv::Mat::at< float >(int,int,int) const ignored, gocv_core.i:279: Warning 516: using cv::Mat::at< float >(int,int,int) instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >() const ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >() instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >(int) ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >(int) const instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >(int const *) const ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >(int const *) instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >(int) const ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >(int) instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >(cv::Point) const ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >(cv::Point) instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >(int,int) const ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >(int,int) instead. gocv_core.i:280: Warning 516: Overloaded method cv::Mat::at< double >(int,int,int) const ignored, gocv_core.i:280: Warning 516: using cv::Mat::at< double >(int,int,int) instead. cp /Users/fredlee/Documents/开发/go/workspace/src/github.com/lazywei/go-opencv/gocv/gocv.go $WORK/github.com/lazywei/go-opencv/gocv/_obj/gocv.go go build github.com/lazywei/go-opencv/gocv: build output "/var/folders/34/z2z_vp1573g5014m8k7wys100000gn/T/go-build392930293/github.com/lazywei/go-opencv/gocv/_obj/gocv.go" already exists and is not an object file macbookpro:gocv fredlee$ 在 2017年6月23日星期五 UTC+8上午10:03:06,Justin Israel写道: > > What about referencing existing OpenCV bindings that are already using > swig? > https://github.com/lazywei/go-opencv/tree/master/gocv > > On Thu, Jun 22, 2017, 9:49 PM Lee Rick <blade...@gmail.com <javascript:>> > wrote: > >> hi,guys >> I wanna wrap opencv2.4.x library to my project by swig, how to do >> it? >> anyone can give me a demo ? >> hope to reply. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.