小编Pie*_*ert的帖子

使用外部lib进行Go + Swig构建

我正在尝试使用opencv函数构建一个cpp文件.

去1.3说swig构建现在捆绑在go构建工具中但是我没有找到一种方法来告诉构建工具添加包含dirs和libs args和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]
Run Code Online (Sandbox Code Playgroud)

有人做过成功吗?

c++ swig pkg-config go

2
推荐指数
1
解决办法
972
查看次数

标签 统计

c++ ×1

go ×1

pkg-config ×1

swig ×1