Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `tflite::InterpreterBuilder::operator() #2

Open
PrathyushaPolepalli opened this issue Jun 19, 2020 · 2 comments

Comments

@PrathyushaPolepalli
Copy link

CMakeFiles/demo.dir/demo.cpp.o: In function test()': demo.cpp:(.text+0x862): undefined reference to tflite::InterpreterBuilder::InterpreterBuilder(tflite::FlatBufferModel const&, tflite::OpResolver const&)'
demo.cpp:(.text+0x87b): undefined reference to tflite::InterpreterBuilder::operator()(std::unique_ptr<tflite::Interpreter, std::default_delete<tflite::Interpreter> >*)' demo.cpp:(.text+0x88a): undefined reference to tflite::InterpreterBuilder::~InterpreterBuilder()'
demo.cpp:(.text+0xaf9): undefined reference to tflite::Interpreter::AllocateTensors()' demo.cpp:(.text+0xbd9): undefined reference to tflite::Interpreter::SetAllowFp16PrecisionForFp32(bool)'
demo.cpp:(.text+0xbf5): undefined reference to tflite::Interpreter::SetNumThreads(int)' demo.cpp:(.text+0xc0c): undefined reference to tflite::Interpreter::Invoke()'
demo.cpp:(.text+0x1521): undefined reference to tflite::InterpreterBuilder::~InterpreterBuilder()' CMakeFiles/demo.dir/demo.cpp.o: In function std::default_deletetflite::Interpreter::operator()(tflite::Interpreter*) const':
demo.cpp:(.text.ZNKSt14default_deleteIN6tflite11InterpreterEEclEPS1[ZNKSt14default_deleteIN6tflite11InterpreterEEclEPS1]+0x1e): undefined reference to `tflite::Interpreter::~Interpreter()'
collect2: error: ld returned 1 exit status
CMakeFiles/demo.dir/build.make:111: recipe for target 'demo' failed
make[2]: *** [demo] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/demo.dir/all' failed
make[1]: *** [CMakeFiles/demo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I'm not able to resolve this error. Can someone help me?

@finnickniu
Copy link
Owner

Sorry for late, It seems your TensorFlow-lite library cannot be found. Check your library first, please follow the instruction from TensorFlow-lite website, and to make sure each function is workable.

@PrathyushaPolepalli
Copy link
Author

I implemented another project on TensorFlow-lite and it is working fine. So, I don't think problem is with TensorFlow-lite. And even in this code problem is only with Interpreter and InterpreterBuilder. I'm not able to resolve this eror.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants