.cu file not execute in command window

2 vues (au cours des 30 derniers jours)
omid Dahaghin
omid Dahaghin le 22 Fév 2015
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.

Réponses (1)

Joss Knight
Joss Knight le 23 Fév 2015
Please follow the documented instructions for authoring and compiling MEX functions in MATLAB:

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by