我正在尝试使用opencv函数构建cpp文件。Go + Swig building with external lib
Go 1.3指出swig building现在捆绑在go build工具中,但我没有找到一种方法来告诉构建工具添加pkg-config包含dirs和libs args。
go test -x cv_test.go
cd /Users/pierre/Projects/go-swig
clang++ -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -g -O2 -o $WORK/_/Users/pierre/Projects/go-swig/_obj/binding.cpp.o -c ./binding.cpp
# _/Users/pierre/Projects/go-swig
In file included from ./binding.cpp:1:
./binding.h:5:10: fatal error: 'cv.h' file not found
$WORK/command-line-arguments/_test/tiler.test
FAIL command-line-arguments [build failed]
有没有人成功了?
-I和 - 之间是否有空格字符是正常的。在clang ++行的开头? – 2014-08-27 09:03:07
如果我用“-I/usr/local/Cellar/opencv/2.4.9/include/opencv -I/usr/local/Cellar/opencv/2.4.9/include”手动运行它,它会起作用 我不'不知道什么 - 我。没有,当我删除它时没有任何影响^^ – 2014-08-27 10:05:47