Hello World Application on DRIVE AGX

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.6.0.8170
other

Host Machine Version
native Ubuntu 18.04
other

I tried to build a Hello World Application following this page DriveWorks SDK Reference: Hello World Application I get this error :

Hi @mohammed.el-yaagoubi,

Are you trying on a host system with host components of DRIVE OS installed by sdkmanager?

Yes

Please try if you can find the header file with below command.
If not, please figure out the problem.

$ find -L /usr/local/cuda/include -iname ‘cuda_runtime_api.h’
/usr/local/cuda/include/cuda_runtime_api.h

Just to be sure the helloworld.cpp file and the building of the application with “gcc” should be on the host machine (ubuntu 18.04) ?

Dear @mohammed.el-yaagoubi,
Yes. You should use ubuntu 18.04 host

When trying to build the application with :
gcc -I/usr/local/driveworks/include/ -I/usr/local/cuda/include helloworld.cpp -ldriveworks -L/usr/local/driveworks/lib/ -lstdc++ -o helloworld

I noticed that I don’t have the folder /usr/local/cuda/include

Dear @mohammed.el-yaagoubi,
There is typo in the sample at line 17. Please use dwRelease(sdk) and check compiling again.

I could compile the sample with out any issue using below command

gcc -I/usr/local/driveworks-3.5/include/ -I/usr/local/cuda-10.2/include helloworld.cpp -ldriveworks -L/usr/local/driveworks-3.5/lib/ -lstdc++ -o helloworld

I noticed that I don’t have the folder /usr/local/cuda/include

Have you used the machine to install DRIVE OS 5.2.0? If not please install DRIVE OS 5.2.0 using sdkmanager first. It installs CUDA 10.2 at /usr/local/ ? Note that cuda and driveworks are symlinks to cuda-10.2 and driveworks-3.5 respectively.

I am using the same machine used to install DRIVE OS 5.2. However I had cuda 11 but since I needed cuda 10.1 for a project. I installed new nvidia drivers 418 instead of 470 and I think this is the source of the problem since I don’t have a /usr/local/cuda-10.1 folder

Good to hear you solved the problem.