I’m currently working on sampleFasterRCNN that jetsonTX2 provides
and I want to add some opencv code on sampleFasterRCNN code
actually I know how to run opencv with Cmakelists.txt but
the sampleFasterRCNN runs with Makefile
and I can’t figure out how to run Makefile with adding opencv or
cmakelists.txt with adding Makefile
====
This is how i did by making Cmakelists.txt including Makefile
thanks!!
it did help a lot!!
Still i got these problems…
– The C compiler identification is GNU 5.4.0
– The CXX compiler identification is GNU 5.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found CUDA: /usr/local/cuda (found version “9.0”)
– Found OpenCV: /usr (found version “3.3.1”)
– Configuring done
– Generating done
– Build files have been written to: /home/nvidia/tensorrt/samples/sampleFasterRCNN/build
Scanning dependencies of target sample_fasterRCNN
[ 50%] Building CXX object CMakeFiles/sample_fasterRCNN.dir/sampleFasterRCNN.cpp.o
[100%] Linking CXX executable sample_fasterRCNN
/usr/bin/ld: CMakeFiles/sample_fasterRCNN.dir/sampleFasterRCNN.cpp.o: undefined reference to symbol ‘cudaFree@@libcudart.so.9.0’
//usr/local/cuda-9.0/targets/aarch64-linux/lib/libcudart.so.9.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/sample_fasterRCNN.dir/build.make:111: recipe for target ‘sample_fasterRCNN’ failed
make[2]: *** [sample_fasterRCNN] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/sample_fasterRCNN.dir/all’ failed
make[1]: *** [CMakeFiles/sample_fasterRCNN.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 22
so I tried to fix CMakelists like this…
link_directories(/usr/lib/aarch64-linux-gnu /usr/local/cuda-9.0/targets/aarch64-linux)
and it still doesn’t work .I guess this is not the way…
Do you have /usr/local/cuda/lib64 in your link dirs ? You may also set LD_LIBRARY_PATH environment variable having this path.
If it is not enough, you may also add -lcudart into your link options.