06-19-2013 01:51 PM
I am trying to build a lib file from the SimpleMultiCopy CUDA sample that i can then use in a legacy C project that is compiled with LabWindows/CVI.
I have modified the example to be pure C by removing dependency on the helper function headers by copy pasting the functions in to the main .cu source file, and enclosing the entire file in extern "C" { ... }
I Set the project type in VS2010 to static library and disabled Whole program optimisation in the configuration properties
In the CVI project, I added the 64bit versions of cuda.lib and cudart.lib, and my newly generated simpleMultiCopy.lib( 64-bit)
Without actually making a call to any of the functions exported from the new lib file, I tried to build the project in CVI and get the following errors.
20Project link errors
Undefined symbol 'acosf' referenced in "simpleMultiCopy.lib".Undefined symbol 'asinf' referenced in "simpleMultiCopy.lib".Undefined symbol 'atanf' referenced in "simpleMultiCopy.lib".Undefined symbol 'atan2f' referenced in "simpleMultiCopy.lib".Undefined symbol 'ceilf' referenced in "simpleMultiCopy.lib"... all of them are math functions..Undefined symbol 'tanhf' referenced in "simpleMultiCopy.lib".Undefined symbol '__iob_func' referenced in "simpleMultiCopy.lib".
which math library should be added to the project to help it find those definitions? Is there an option in VS2010 to bake that dependency into the lib file it generates?
06-20-2013 08:48 AM
Hello Performance
My recommendation is to ask NVIDIA support which Math Library are the NVIDIA libraries expecting, they will have more knowledge about it that NI or Microsoft support.
Regards
Mart G
06-20-2013 02:50 PM
I posted it here : https://devtalk.nvidia.com/default/topic/547956/cuda-programming-and-performance/math-library-linkin...
I will update this thread also when I know the solution.
Thanks
Cheers
Ram