nvcc : fatal error : Could not set up the environment for Microsoft Visual Studio using ...

I meet this error when I complie opencv + cuda.

I have tried hundreds of times to solve this problem.
I tried opencv 2.4.8 + cuda 5.5 + vs 2012
opencv 2.4.8 + cuda 6 + vs 2012
opencv 2.4.9 + cuda 5.5 + vs 2012
opencv 2.4.9 + cuda 6 + vs 2012
opencv 2.4.9 + cuda 6 + vs 2013.

when I almost dead, I find solution.
It is solution.
Open "nvcc.profile" by text editor.
This file may be located in "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin" (in my case)
And add this setense
CUDA_NVCC_FLAGS += --compiler-bindir = "-IE:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin"

so this figure is all contents of nvcc.profile.

I am happy to notice this tip to world.


Popular posts from this blog

OpenCV Stitching example (Stitcher class, Panorama)

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Real-time N camera stitching Class.

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Optical Flow sample source code using OpenCV

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)

(OpenCV Study) calcOpticalFlowFarneback example source code ( dense optical flow )

yuv422(YUYV) to RGB and RGB to yuv422(YUYV), (Using OpenCV and TBB)

OpenCV Drawing Example, (line, circle, rectangle, ellipse, polyline, fillConvexPoly, putText, drawContours)