tensorRT_Pro icon indicating copy to clipboard operation
tensorRT_Pro copied to clipboard

Error when make the project!!!

Open Bedoctor opened this issue 2 years ago • 1 comments

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, std::allocator > >::RepeatedPtrField()'

My system environment:

Ubuntu 20.04 Tensorrt 8.2.1.8 onnx 1.12 protobuf 3.11.4

Thx

Bedoctor avatar Sep 22 '22 01:09 Bedoctor

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
)

cyrusbehr avatar Mar 22 '23 20:03 cyrusbehr