When trying to compile the Szeta.cu file on a computer running 64 bit vista with a Quadro NVS 290, I get the error
>> nvmex -f nvmexopts.bat Szeta.cu -IC:\NVIDIA\CUDA\include -LC:\NVIDIA\CUDA\lib -lcufft -lcudart
Szeta.cu
c:\nvidia\cuda\include\common_functions.h(56): warning: dllexport/dllimport
conflict with "clock" (declared at line 176 of "C:/Program Files
(x86)/Microsoft Visual Studio 8/VC/bin/..\INCLUDE\time.h");
dllimport/dllexport dropped
tmpxft_000009e0_00000000-3_Szeta.cudafe1.gpu
tmpxft_000009e0_00000000-8_Szeta.cudafe2.gpu
c:\nvidia\cuda\include\common_functions.h(56): warning: dllexport/dllimport
conflict with "clock" (declared at line 176 of "C:/Program Files
(x86)/Microsoft Visual Studio 8/VC/bin/..\INCLUDE\time.h");
dllimport/dllexport dropped
tmpxft_000009e0_00000000-3_Szeta.cudafe1.cpp
cl : Command line warning D9025 : overriding '/EHc-' with '/EHc'
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Users\oct\AppData\Local\Temp\mex_197DDF2C-6523-4C9F-1C89-2B222619C032\Szeta.obj
Creating library C:\Users\oct\AppData\Local\Temp\mex_197DDF2C-6523-4C9F-1C89-2B222619C032\templib.x and object C:\Users\oct\AppData\Local\Temp\mex_197DDF2C-6523-4C9F-1C89-2B222619C032\templib.exp
Szeta.obj : error LNK2001: unresolved external symbol _fltused
Szeta.obj : error LNK2001: unresolved external symbol __GSHandlerCheck
Szeta.obj : error LNK2019: unresolved external symbol __security_cookie referenced in function __device_stub__Z12non_linear_2PfP6float2S1_S1_fi
Szeta.obj : error LNK2019: unresolved external symbol __security_check_cookie referenced in function __device_stub__Z12non_linear_2PfP6float2S1_S1_fi
LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup
Szeta.mexw64 : fatal error LNK1120: 5 unresolved externals
C:\PROGRA~1\MATLAB\R2007A\BIN\NVMEX.PL: Error: Link of 'Szeta.mexw64' failed.
??? Error using ==> nvmex at 206
Unable to complete successfully.
Does anybody know how to solve this? If you want more details of how I got this error you can read on:
In short, when I try to compile Szeta.cu I get the error:
$ARCH (UNKNOWN) not set correctly [win64]
So I hard coded the $ARCH variable in the nvmex.pl perl script attached (from C:\Program Files\MATLAB\R2007a\bin) by explicitly setting $ARCH = “win64”; and this seemed to make that error go away.
I then got more errors and ended up changing some of the “32”'s and “86”'s in the nvmexopts.bat file (attached) with “64”'s. (Ex: I changed /Machine:x86 to /Machine:X64 and I left some 32’s such as kernel32.lib since this seemed to work in the 64 bit CUDA template posted by kyzhao at http://forums.nvidia.com/index.php?act=ST&…t=0#entry390252 )
At one point I also got the error:
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
since I am using the MSVC compiler from MATLAB but I ended up fixing that by adding the -ccbin switch under “Compiler Parameters” in the nvmexopts.bat file nvmexopts.bat.txt (2.97 KB) nvmex.pl.txt (104 KB)
I have faced the same problem today with a xp64 machine. I have solved the problem and will be posting the configuration files tomorrow. the problem lies in the nvmex options. it it made for 32-bit so all you need to do is to change the directories in the LIB variable to point to their AMD64 counterparts (example : %VCINSTALLDIR/LIB/AMD64).
as I said I will be posting the configuration files once I go back to the office tomorrow.
So I hard coded the $ARCH variable in the nvmex.pl perl script attached (from C:\Program Files\MATLAB\R2007a\bin) by explicitly setting $ARCH = “win64”; and this seemed to make that error go away.
I am having trouble getting nvmex to work with the following:
Matlab 7.5.0 (2007b)
Vista 64 bit
Microsoft Visual Studio 9.0 (2008)
The latest standard ‘nvmexopts.bat’ and ‘nvmex.pl’ files did not work (as could be expected in this case), so I tried the ones linked here by wedgeproduct (for 2007a).
The only entries in these files I found to change were in ‘nvmexopts.bat’, i.e. replacing
“set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8”
with
“set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0”
When I try to compile the Szeta.cu in Matlab with the following command:
"nvcc fatal : Visual Studio configuration file ‘(null)’ could not be found for installation at ‘C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN/…/…’
C:\PROGRA~4\MATLAB\R2007B\BIN\NVMEX.PL: Error: Compile of ‘Szeta.cu’ failed.
??? Error using ==> nvmex at 206
Unable to complete successfully."
Can anyone suggest what i still need to do to get this to work?
In my case I have the file ‘vcvars64.bat’ in the directory ‘C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin’, so that’s one issue others have discussed that doesn’t seem to apply here.
In any case, these other posts seem to imply that Express 2008 + SDK can fail for 64 bit compilation whereas the standard VC++2008 works fine…
I am tempted to uninstall the 64 bit CUDA Toolkit/SDK and try installing/using the 32 bit versions … but I have the feeling this might not function on my 64 bit system…