tensorRT_Pro
tensorRT_Pro copied to clipboard
Error when make the project!!!
Hi, dear authors, there is an error when I made the project, see the following:
/usr/bin/ld: CMakeFiles/pro.dir/src/tensorRT/onnx/onnx-ml.pb.cpp.o: in function onnx::AttributeProto_AttributeType_descriptor()': ~/tensorRT_Pro/src/tensorRT/onnx/onnx-ml.pb.cpp:947: undefined reference to
google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*)'
/usr/bin/ld: CMakeFiles/pro.dir/src/tensorRT/onnx/onnx-ml.pb.cpp.o: in function onnx::TensorProto_DataType_descriptor()': undefined reference to
google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits
My system environment:
Ubuntu 20.04 Tensorrt 8.2.1.8 onnx 1.12 protobuf 3.11.4
Thx
Essentially, in the link_directories
command, protobuf
must be infront of TensorRT
, as TensorRt has it's own protobuf files in that directory.
So this works:
link_directories(
${PROTOBUF_DIR}/lib
${TENSORRT_DIR}/lib
)
This will not work:
link_directories(
${TENSORRT_DIR}/lib
${PROTOBUF_DIR}/lib
)