Hi all,
I have a c library which uses a cuda library. The C library is big, so I don’t want to change it to cuda. Each library by itself compiles properly, but when linking them together, the C lib doesn’t find the cuda lib.
In the cuda lib, I tried writing an intermediate function in a c file which calls the cuda function, the compiler links to the c file in the cuda lib, but can’t link to the cuda functions, which leads me to think that the problem is with the difference between c and cuda compiler.
When I build the executable project which uses the lib that uses the cuda lib I got the following output:
(The executable is the project called msieve, that lib that msieve is using is common, and common is using test_cuda lib.)
1>------ Build started: Project: test_cuda, Configuration: Debug Win32 ------
1>Build started 6/24/2012 7:19:11 PM.
1>InitializeBuildStatus:
1> Creating “Debug\test_cuda.unsuccessfulbuild” because “AlwaysCreate” was specified.
1>AddCudaCompileDeps:
1>Skipping target “AddCudaCompileDeps” because all output files are up-to-date with respect to the input files.
1>AddCudaCompileDeps:
1>Skipping target “AddCudaCompileDeps” because all output files are up-to-date with respect to the input files.
1>AddCudaCompilePropsDeps:
1>Skipping target “AddCudaCompilePropsDeps” because all output files are up-to-date with respect to the input files.
1>AddCudaCompilePropsDeps:
1>Skipping target “AddCudaCompilePropsDeps” because all output files are up-to-date with respect to the input files.
1>CudaBuild:
1>Skipping target “CudaBuild” because all output files are up-to-date with respect to the input files.
1>CudaBuild:
1>Skipping target “CudaBuild” because all output files are up-to-date with respect to the input files.
1>Lib:
1> All outputs are up-to-date.
1> cuda.vcxproj → C:\Users\Otniel\Dropbox\Otniel\Projects\msieve-1.50\build.vc10\Debug\test_cuda.lib
1>FinalizeBuildStatus:
1> Deleting file “Debug\test_cuda.unsuccessfulbuild”.
1> Touching “Debug\test_cuda.lastbuildstate”.
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.06
2>------ Build started: Project: msieve, Configuration: Debug Win32 ------
2>Build started 6/24/2012 7:19:11 PM.
2>InitializeBuildStatus:
2> Touching “Win32\Debug\msieve.unsuccessfulbuild”.
2>ClCompile:
2> All outputs are up-to-date.
2>ManifestResourceCompile:
2> All outputs are up-to-date.
2>common.lib(lanczos.obj) : error LNK2019: unresolved external symbol _transpose_64x64_cuda referenced in function _transpose_64x64
2>C:\Users\Otniel\Dropbox\Otniel\Projects\msieve-1.50\build.vc10..\bin\Win32\Debug\msieve.exe : fatal error LNK1120: 1 unresolved externals
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:01.57
========== Build: 1 succeeded, 1 failed, 4 up-to-date, 0 skipped ==========
thank you for your help.