Hy,
I am new to C++ programming and would really appreciate any tips. I made example of parsing uff model and predicting in tensorrt(not tf-trt) with python. But Xavier doesn’t support python tensorrt API so I need to doce in C++ in order to finish my home project :). I have finished fair amount of time learning c++, but I still don’t understand how to qrite Makefile. I will use openCV and tesnorrt. I tested sample Makefile for openCV(https://gist.github.com/kevinhughes27/5311609), but how do I add tensorrt In this? I get error “undefined reference to `createUffParser()'” for code like
#include "NvInfer.h"
#include "NvUffParser.h"
using namespace nvuffparser;
using namespace nvinfer1;
int main(){
auto var = createUffParser();
}
Creating network and builder seems to work fine, but how do I solve this error? I created network and builder with example openCV makefile mentioned above. I also look into(and tried different thing) with flags in makefile like “-I”, “-l”, “-L” but can’t solve this. I really appreciate any help!
EDIT
I also tried to make sense out of Makefile and Makefile.conf of samples(sampleUffMNIST seems to be perfect as it dos the thing I want to do). To me, it seems like it runs script with “g++ -Wall -std=c++11 -I/usr/local/cuda/include -I/usr/local/include -I…/include -I…/common -I/usr/local/cuda/include -I…/…/include -D_REENTRANT -c -o …/…/bin/chobj/sampleUffMNIST.o sampleUffMNIST.cpp” but I can’t include opencv which I need. So any help from this direction is also helpfull.