rockingdingo / tensorflow-tutorial

Some tensorflow demo
110 stars 68 forks source link

Help Make error #2

Open qichaotang opened 7 years ago

qichaotang commented 7 years ago

Apple LLVM version 9.0.0 (clang-900.0.38) Target: x86_64-apple-darwin16.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 302.3 -v -dwarf-column-info -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0 -I /usr/local/include/tf -I /usr/local/include/eigen3 -D _DEBUG -D _THREAD_SAFE -I /usr/local/include -D _THREAD_SAFE -stdlib=libc++ -Wall -Wshadow -Wno-sign-compare -Wno-invalid-partial-specialization -w -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/baidu/Documents/sequence_labelling_code/TensorFlow_10_22/tensorflow-tutorial/cpp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o /Users/baidu/temp/main-b8b785.o -x c++ ./src/main.cpp clang -cc1 version 9.0.0 (clang-900.0.38) default target x86_64-apple-darwin16.7.0 ignoring nonexistent directory "/usr/include/c++/v1" ignoring duplicate directory "/usr/local/include" as it is a non-system directory that duplicates a system directory

include "..." search starts here:

include <...> search starts here:

/usr/local/include/tf /usr/local/include/eigen3 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name ann_model_loader.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 302.3 -v -dwarf-column-info -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0 -I /usr/local/include/tf -I /usr/local/include/eigen3 -D _DEBUG -D _THREAD_SAFE -I /usr/local/include -D _THREAD_SAFE -stdlib=libc++ -Wall -Wshadow -Wno-sign-compare -Wno-invalid-partial-specialization -w -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/baidu/Documents/sequence_labelling_code/TensorFlow_10_22/tensorflow-tutorial/cpp -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o /Users/baidu/temp/ann_model_loader-778b49.o -x c++ ./src/ann_model_loader.cpp clang -cc1 version 9.0.0 (clang-900.0.38) default target x86_64-apple-darwin16.7.0 ignoring nonexistent directory "/usr/include/c++/v1" ignoring duplicate directory "/usr/local/include" as it is a non-system directory that duplicates a system directory

include "..." search starts here:

include <...> search starts here:

/usr/local/include/tf /usr/local/include/eigen3 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /usr/include /System/Library/Frameworks (framework directory) /Library/Frameworks (framework directory) End of search list. "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.12.0 -w -o ./bin/tfcpp_demo -L/usr/local/lib -L/usr/local/lib -lprotobuf -ltensorflow_cc /Users/baidu/temp/main-b8b785.o /Users/baidu/temp/ann_model_loader-778b49.o -L. -L/Users/baidu/tools/protobuf/lib -L. -L/Users/baidu/tools/mpich/lib -L/Users/baidu/tools/glog/lib -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a Undefined symbols for architecture x86_64: "tensorflow::TensorShapeBase::TensorShapeBase(std::initializer_list)", referenced from: ZN10tensorflow11TensorShapeCI2NS_15TensorShapeBaseIS0_EEESt16initializer_listIxE in ann_model_loader-778b49.o "tensorflow::TensorShapeBase::dims() const", referenced from: tf_model::ANNModelLoader::predict(tensorflow::Session*, tf_model::FeatureAdapterBase const&, std::__1::basic_string<char, std::1::char_traits, std::__1::allocator >, double*) in ann_model_loader-778b49.o Eigen::DSizes<long, 2> tensorflow::TensorShape::AsEigenDSizesWithPadding<2>() const in ann_model_loader-778b49.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ycdhqzhiai commented 7 years ago

http://tuatini.me/building-tensorflow-as-a-standalone-project/