.cu file not execute in command window

조회 수: 2 (최근 30일)
omid Dahaghin
omid Dahaghin 2015년 2월 22일
답변: Joss Knight 2015년 2월 23일
Hi All...I am new in Matlab At First I think this information is necessary: My OS is windows 7 64bit. I have visual studio 2010 Ulitimate in c:\program Files(x86).
I have CUDA version 6.5.
And my Graphic card is nvidia GEFORCE GT 520m i have a .cu file with a name of Addvectors.cu.
When I execute it in Command window I have this error:
system('nvcc -c AddVectors.cu') nvcc fatal : Cannot find compiler 'cl.exe' in PATH
ans =
1
And for a solve it I describe the Address Of cl.exe in Advance system setting and Environment variable in system variable with variable cl.exe and value C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin and after it i test it again and I have the above error again.
so I test this code in command window:
system('nvcc -c AddVectors.cu -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin"')
AddVectors.cu(1) : fatal error C1083: Cannot open include file: 'mex.h': No such file or directory AddVectors.cu
in this time I have a problem with mex.h!!! I know this library in matlab root and extern folder and when I copy it and paste in my project folder address it is not working too and have the same error like the above.
what can i do???? Please Help me I have a problem for along time.

답변 (1개)

Joss Knight
Joss Knight 2015년 2월 23일
Please follow the documented instructions for authoring and compiling MEX functions in MATLAB:

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by