Exe in Ubuntu must run with '__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia’?

run with
add ‘__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia’ to enviroment var is the only way?

is there any way to add something in the code/cmake/makefile, so can be run as the normal exe, eg. ./test


How does this relate to CUDA programming? I see no connection to CUDA. This answer on Ask Ubuntu may be relevant / of interest:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.