tx2 non cross compile

I wonder if i can get ride of cross compile for cuda since i want to use opencv at same time.
does any one know how to export modules and use a compiler(nvcc or icc) to compile cuda code via command line?

more specifically, i have two confusion

  1. I can write a simple cuda program and compile using nvcc, but i can’t use nvcc compile files in sample, a error like helper_cuda.h not found showed up. i wonder what path i need to include for it?
    is there a way i can include ‘all’ of them

  2. the cuda samples using openGL and cuda for image processing. what is i want to use opencv? i already have opencv3 running. But i had a hard time to compile cuda and opencv using a makefile or g++ command. Any useful resource would be appreciate!


Since none is answering, i just post the makefile myself :)
CUDA_INSTALL_PATH := /usr/local/cuda

CXX := g++
CC := gcc
LINK := g++ -fPIC
NVCC := nvcc



Common flags


LIB_CUDA := -L$(CUDA_INSTALL_PATH)/lib -lcudart
OBJS = GpuSolver.cu.o main.cpp.o
TARGET = exec

.SUFFIXES: .c .cpp .cu .o

%.c.o: %.c
(CC) (CFLAGS) -c < -o @

%.cu.o: %.cu
(NVCC) (NVCCFLAGS) -c < -o @

%.cpp.o: %.cpp
(CXX) (CXXFLAGS) -c < -o @

(TARGET): (OBJS) Makefile