CUDA 4.0 RC dllexport/dllimport conflicts for math.h of VS2008 x64

Hi,

I just installed CUDA 4.0 RC. When compiling with Visual Studio 2008 for x64 I get a lot of warnings about dllexport/dllimport conflicts (I’m using the DLL variants of the Microsoft Runtime Libraries). The examples from GPU Computing SDK don’t suffer from this, since they use the static runtimes.

Despite these warnings my program builds, links and runs. The warnings are quite annoying anyway. I’m know looking for a way to get rid them. Turning of the warnings of the Visual Studio compiler can be done by putting /wd4273 on the command line. Unfortunately, NVCC only has an option to turn off all warning messages!

Any ideas/suggestions? Thanks!

[font=“Courier New”]

1>"c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(124): warning: dllexport/dllimport conflict with “sinf”

1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(217): here; dllimport/dllexport dropped

1>"c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(129): warning: dllexport/dllimport conflict with “cosf”

1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(216): here; dllimport/dllexport dropped

1>"c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(364): warning: dllexport/dllimport conflict with “modff”

1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(229): here; dllimport/dllexport dropped

1>"c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(369): warning: dllexport/dllimport conflict with “fmodf”

1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(238): here; dllimport/dllexport dropped

1>c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(124) : warning C4273: ‘sinf’ : inconsistent dll linkage

1> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(217) : see previous definition of ‘sinf’

1>c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(129) : warning C4273: ‘cosf’ : inconsistent dll linkage

1> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(216) : see previous definition of ‘cosf’

1>c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(364) : warning C4273: ‘modff’ : inconsistent dll linkage

1> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(229) : see previous definition of ‘modff’

1>c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\math_functions.h(369) : warning C4273: ‘fmodf’ : inconsistent dll linkage

1> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(238) : see previous definition of ‘fmodf’

[/font]

I get the same warnings when linking through Matlab using MSVC 2008.

They appeared right after changing to Cuda 4.0 RC

Hi,
it’s the same for me ;/
I hope they will get rid of it with the next RC.

Regards,
Greg