getting error "fatal error C1083: Cannot open include file: 'mex.h': No such file or directory" when trying to create mex
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
For some reason mex.h is not being found. I am using microsoft visual c++ 2010 express and matlab 2011b. I have done the mex -setup, and set visual c++ express as my compiler. But cannot figure out why it is not working.
3 Kommentare
Falak Shah
am 7 Jul. 2014
C:\Users\falak\Documents\MATLAB>call C:\Users\falak\AppData\Local\Temp/tmpxft_000013a0_00000000-2.bat Setting environment for using Microsoft Visual Studio 2010 x64 tools.
C:\Users\falak\Documents\MATLAB>set 1>C:\Users\falak\AppData\Local\Temp/tmpxft_000013a0_00000000-1 #$ SPACE= #$ CUDART=cudart #$ HERE=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin #$ THERE=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin #$ TARGET_SIZE= #$ TARGET_DIR= #$ TARGET_SIZE=64 #$ WIN_PLATFORM=x64 #$ TOP=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/.. #$ NVVMIR_LIBRARY_DIR=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../nvvm/libdevice #$ PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../open64/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../nvvm/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../lib;C:\Program Files\MATLAB\R2012b\bin\win64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\windows\SYSTEM32;C:\windows;C:\windows\SYSTEM32\WBEM;C:\windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\WINDOWS LIVE\SHARED;%QUARTUS_ROOTDIR%\BIN;C:\PROGRAM FILES\MATLAB\R2009B\RUNTIME\WIN64;C:\PROGRAM FILES\MATLAB\R2009B\BIN;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\RSoft\bin;C:\RSoft\bin32;C:\Program Files\MATLAB\R2012b\runtime\win64;C:\Program Files\MATLAB\R2012b\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\opencv\build\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin #$ INCLUDES="-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../include" #$ LIBRARIES= "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../lib/x64" #$ CUDAFE_FLAGS= #$ OPENCC_FLAGS= #$ PTXAS_FLAGS= #$ VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../ #$ VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/ #$ C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/../../VC/bin/amd64/vcvars64.bat #$ CommandPromptType=Native #$ Framework35Version=v3.5 #$ FrameworkDir=C:\windows\Microsoft.NET\Framework64 #$ FrameworkDIR64=C:\windows\Microsoft.NET\Framework64 #$ FrameworkVersion=v4.0.30319 #$ FrameworkVersion64=v4.0.30319 #$ FSHARPINSTALLDIR=C:\Program Files (x86)\Microsoft F#\v4.0\ #$ INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include; #$ LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/ATLMFC\LIB\amd64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\x64; #$ LIBPATH=C:\windows\Microsoft.NET\Framework64\v4.0.30319;C:\windows\Microsoft.NET\Framework64\v3.5;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/ATLMFC\LIB\amd64; #$ Path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/BIN\amd64;C:\windows\Microsoft.NET\Framework64\v4.0.30319;C:\windows\Microsoft.NET\Framework64\v3.5;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../open64/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../nvvm/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../lib;C:\Program Files\MATLAB\R2012b\bin\win64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\windows\SYSTEM32;C:\windows;C:\windows\SYSTEM32\WBEM;C:\windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\WINDOWS LIVE\SHARED;%QUARTUS_ROOTDIR%\BIN;C:\PROGRAM FILES\MATLAB\R2009B\RUNTIME\WIN64;C:\PROGRAM FILES\MATLAB\R2009B\BIN;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\RSoft\bin;C:\RSoft\bin32;C:\Program Files\MATLAB\R2012b\runtime\win64;C:\Program Files\MATLAB\R2012b\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\opencv\build\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin #$ Platform=X64 #$ VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\..\..\Common7\Tools\ #$ WindowsSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\ #$ PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/redist/x64/Microsoft.VC100.CRT;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/BIN\amd64;C:\windows\Microsoft.NET\Framework64\v4.0.30319;C:\windows\Microsoft.NET\Framework64\v3.5;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../open64/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../nvvm/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../lib;C:\Program Files\MATLAB\R2012b\bin\win64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\windows\SYSTEM32;C:\windows;C:\windows\SYSTEM32\WBEM;C:\windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\WINDOWS LIVE\SHARED;%QUARTUS_ROOTDIR%\BIN;C:\PROGRAM FILES\MATLAB\R2009B\RUNTIME\WIN64;C:\PROGRAM FILES\MATLAB\R2009B\BIN;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\RSoft\bin;C:\RSoft\bin32;C:\Program Files\MATLAB\R2012b\runtime\win64;C:\Program Files\MATLAB\R2012b\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\opencv\buildAddVectors.cu AddVectors.cu(2) : fatal error C1083: Cannot open include file: 'mex.h': No such file or directory # --error 0x2 -- \bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin #$ PATH=C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/../../VC/bin/amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/redist/x64/Microsoft.VC100.CRT;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/BIN\amd64;C:\windows\Microsoft.NET\Framework64\v4.0.30319;C:\windows\Microsoft.NET\Framework64\v3.5;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../VC/VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Common7\Tools;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../../Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../open64/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../nvvm/bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin/../lib;C:\Program Files\MATLAB\R2012b\bin\win64;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\libnvvp;C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT SHARED\WINDOWS LIVE;C:\windows\SYSTEM32;C:\windows;C:\windows\SYSTEM32\WBEM;C:\windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\WINDOWS LIVE\SHARED;%QUARTUS_ROOTDIR%\BIN;C:\PROGRAM FILES\MATLAB\R2009B\RUNTIME\WIN64;C:\PROGRAM FILES\MATLAB\R2009B\BIN;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\RSoft\bin;C:\RSoft\bin32;C:\Program Files\MATLAB\R2012b\runtime\win64;C:\Program Files\MATLAB\R2012b\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\opencv\build\bin;C:\Program Files (x86)\opencv\build\x86\vc10\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin #$ cl @C:\Users\falak\AppData\Local\Temp/tmpxft_000013a0_00000000-9.res > "C:/Users/falak/AppData/Local/Temp/tmpxft_000013a0_00000000-8_AddVectors.cpp1.ii"
James Tursa
am 7 Jul. 2014
I can't read through all of that output. How, exactly, are you trying to compile the file? Are you compiling with a bat file outside of MATLAB, and not with the mex command at the MATLAB command line?
Antworten (0)
Siehe auch
Kategorien
Mehr zu GPU Computing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!