go - Unable to use cgo CFLAGS -
i have manually cloned go directory of tensorflow(a library working on ) in /home/arafat/go/src/github.com/tensorflow/tensorflow/tensorflow/contrib/go
can take here. have made changes lib.go
// #cgo ldflags: -ltensorflow // #cgo cflags: -i /home/arafat/go/src/github.com/tensorflow/tensorflow // #cgo cxxflags: -i /home/arafat/go/src/github.com/tensorflow/tensorflow -std=c++11
but getting error
# github.com/tensorflow/tensorflow/tensorflow/contrib/go in file included go/src/github.com/tensorflow/tensorflow/tensorflow/contrib/go/tf_session_helper.cc:20:0: go/src/github.com/tensorflow/tensorflow/tensorflow/contrib/go/tf_session_helper.h:22:49: fatal error: tensorflow/core/public/tensor_c_api.h: no such file or directory #include "tensorflow/core/public/tensor_c_api.h" ^ compilation terminated.
on doing
go github.com/tensorflow/tensorflow/tensorflow/contrib/go
i not able understand why not working.
likely mistake include path, 1 tensorflow many? perhaps should
// #cgo cflags: -i /home/arafat/go/src/github.com/tensorflow
or
#include "core/public/tensor_c_api.h"
Comments
Post a Comment