Context: PC running ubuntu 18.04, new install of NSight Eclipse on x86, trying to cross compile for Jetson Nano (aarch64).
Installed the CUDA plugin for cross-aarch64.
Testing by opening a new project, importing the SobelFilter sample prj
Compile errors… undefined references.
So I look at the Includes section of the project explorer window and see just the following entries:
Looking at the undefined refs, I dig around and find they seem to be in there:
which is #included by freeglut.h
So why does the compiler not find it?
I also noted a load of #includes that seemed “unresolved”, with question marks in the editor - for example
I found that among the cross compiler library files in the toolkit so I added the path:
Project Properties → C/C++ General → Paths and Symbols:
Includes tab, added /usr/local/cuda-10.2/targets/aarch64-linux/include
Library Paths tab, added /usr/local/cuda-10.2/targets/aarch64-linux/lib
Now, nothing has changed - the new Include path is still not listed in the Includes section of the project view, and Build… the problem is still there, the same references still unresolved. I know Eclipse is somewhat clumpy so I closed and reopened the project… even closed NSight and restarted… still no change. The #include <cuda_runtime> is still marked as ‘unresolved’.
Here’s the first part of the report from BUILD:
Building file: …/src/SobelFilter.cpp
Invoking: NVCC Compiler
/usr/local/cuda-10.2/bin/nvcc -I"/usr/local/cuda-10.2/samples/3_Imaging" -I"/usr/local/cuda-10.2/samples/common/inc" -I/usr/local/cuda-10.2/targets/aarch64-linux/include -I"/home/henry/cuda-workspace/SobelFilter" -O3 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -ccbin aarch64-linux-gnu-g++ -x c++ -o “src/SobelFilter.o” “…/src/SobelFilter.cpp”
/tmp/tmpxft_00001415_00000000-4_SobelFilter.o: In function
keyboard(unsigned char, int, int)': SobelFilter.cpp:(.text+0xf0): undefined reference to glutSetWindowTitle’
so - the #include is there, the library path root has been specified…
What magic pixie-dust do I need to make this work…? Clues, anyone?