Hi,
I’m compiling matlab mex files using nvmex and it works fine.
I added “-deviceemu” to the “compflags” line in “nvmexopts.bat” and then when I try to compile I get the following error:
nvmex -f nvmexoptsEMU.bat -IC:\cuda\include -IC:\CUDA\bin -IC:\CUDA\common\inc -LC:\cuda\lib -LC:\CUDA\common\lib -LC:\CUDA\bin -lcufft -lcudart -lcutil32D -lcutil32 -lcufftemu -lcublasemu -lcuda temp.cu
temp.cu
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\time.h(176): here; dllimport/dllexport dropped
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\time.h(176): here; dllimport/dllexport dropped
tmpxft_00001768_00000000-3_temp.cudafe1.cpp
cl : Command line warning D9025 : overriding ‘/EHc-’ with ‘/EHc’
tmpxft_00001768_00000000-7_temp.ii
c:\cuda\include\math_functions.h(159) : error C2201: ‘__cuda_floor’ : must have external linkage in order to be exported/imported
c:\cuda\include\math_functions.h(199) : error C2201: ‘__cuda_ldexp’ : must have external linkage in order to be exported/imported
c:\cuda\include\math_functions.h(224) : error C2201: ‘__cuda_frexp’ : must have external linkage in order to be exported/imported
c:\cuda\include\math_functions.h(264) : error C2201: ‘__cuda_ceil’ : must have external linkage in order to be exported/imported
c:\cuda\include\math_functions.h(299) : error C2201: ‘__cuda_hypot’ : must have external linkage in order to be exported/imported
c:\cuda\include\math_functions.h(314) : error C2201: ‘__cuda_modf’ : must have external linkage in order to be exported/imported
c:\cuda\include\math_functions_dbl_ptx1.h(91) : error C2491: ‘__cuda_ceil’ : definition of dllimport function not allowed
c:\cuda\include\math_functions_dbl_ptx1.h(101) : error C2491: ‘__cuda_floor’ : definition of dllimport function not allowed
c:\cuda\include\math_functions_dbl_ptx1.h(226) : error C2491: ‘__cuda_hypot’ : definition of dllimport function not allowed
c:\cuda\include\math_functions_dbl_ptx1.h(256) : error C2491: ‘__cuda_ldexp’ : definition of dllimport function not allowed
c:\cuda\include\math_functions_dbl_ptx1.h(271) : error C2491: ‘__cuda_frexp’ : definition of dllimport function not allowed
c:\cuda\include\math_functions_dbl_ptx1.h(276) : error C2491: ‘__cuda_modf’ : definition of dllimport function not allowed
C:\MATLAB~1\BIN\NVMEX.PL: Error: Compile of ‘temp.cu’ failed.
??? Error using ==> nvmex at 206
Unable to complete successfully.
I added all the libraries I could find to the -L switch. What lib file deals with math_functions and what does it want from me…? Why does this problem occur only with -deviceemu and does not occur without it…?
Any assistance here will be greatly appreciated…
Thank you!
Y.