【发布时间】:2014-08-27 08:13:57
【问题描述】:
我正在尝试使用 opencv 函数构建一个 cpp 文件。
Go 1.3 声明 swig 构建现在捆绑在 go build 工具中,但我没有找到方法告诉构建工具使用 pkg-config 添加包含目录和库参数。
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++ 行的开头?
-
如果我使用“-I/usr/local/Cellar/opencv/2.4.9/include/opencv -I/usr/local/Cellar/opencv/2.4.9/”手动运行它就可以了包括“我不知道 -I 是什么。确实,当我删除它时它没有效果^^
标签: c++ go swig pkg-config