cjweeks / tensorflow-cmake

Integrate TensorFlow with CMake projects effortlessly
MIT License
331 stars 81 forks source link

how to compile tensorflow static lib with cmake #36

Open bikong2 opened 6 years ago

bikong2 commented 6 years ago

i do as this git, and i can compile libtensorflow_all.so successfully, and it runs ok. but when i want to compile a static lib libtensorflow_all.a and i just modified the linkshared = 1 to linkstatic = 1, linkshared = 0. but error occurs error: undefined reference to 'tensorflow::OpDef::~OpDef()' error: undefined reference to 'tensorflow::OpDefBuilder::OpDefBuilder(tensorflow::StringPiece)'

and so on...

any idea to fix this bug?