committedandroider
committedandroider

Reputation: 9261

Why do I get a not declared in this scope error even though the header file is included?

The error I get is

/opt/workspace/IhmActon/ihm_acton/src/model_inference/retinanet/engine.cpp:213:5:
error: ‘trt_unique_ptr’ was not declared in this scope
     trt_unique_ptr<trt::IHostMemory> serialized_engine = wrap_trt_ptr(engine->serialize());

This is a photo snippet of that function and where the error is enter image description here

The declaration of trt_unique_ptr is in this header file(tensorrt.hpp). enter image description here

In engine.hpp, I have an import statement to include that header file - #include "model_optimizer/tensorrt.hpp" . I do not see any errors with the import statement

Why do I still get this not declared in scope error?

Upvotes: 0

Views: 130

Answers (1)

VLL
VLL

Reputation: 10155

trt_unique_ptr is inside namespace ihm_springfield. Use ihm_springfield::trt_unique_ptr instead.

Upvotes: 1

Related Questions