I am trying to link my cuda object to my main program. The regular cpp files were compiled to .o object, and the cuda stuff to the .co object.
What am I missing? This is the linker command, and corresponding output.
I used essentially the same type of command before to create an archive which I was able to link to a different executable, but this seems to be giving me a problem.
Thanks
g++ -o YamaguchiGPU YamaguchiMain.o YamaguchiDecomp.o cuYamaguchi.co -L/usr/lib64/ ../../lib/IDT.a ../../lib/Linux/libxerces-c.a ../../lib/Linux/libfftw3f.a -lcurl -lidn -ldl -lssl -lm -lpthread -lcuda -L/usr/local/cuda/lib64/libcudart.so -L/usr/lib64/libcuda.so
cuYamaguchi.co: In function `__sti____cudaRegisterAll_46_tmpxft_000032a2_00000000_4_cuYamaguchi_cpp1_ii_init_gpu()':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x1b4): undefined reference to `__cudaRegisterFatBinary'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x20f): undefined reference to `__cudaRegisterFunction'
cuYamaguchi.co: In function `__cudaUnregisterBinaryUtil()':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x23c): undefined reference to `__cudaUnregisterFatBinary'
cuYamaguchi.co: In function `__device_stub__Z22yamaguchi_solve_kerneliiiP6float2S0_S0_Pf(int, int, int, float2*, float2*, float2*, float*)':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x278): undefined reference to `cudaSetupArgument'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x29e): undefined reference to `cudaSetupArgument'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x2c4): undefined reference to `cudaSetupArgument'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x2ea): undefined reference to `cudaSetupArgument'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x30c): undefined reference to `cudaSetupArgument'
cuYamaguchi.co:tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x32e): more undefined references to `cudaSetupArgument' follow
cuYamaguchi.co: In function `yama_wrapper':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x1758): undefined reference to `cudaConfigureCall'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x17a9): undefined reference to `cudaFreeHost'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x17b5): undefined reference to `cudaFreeHost'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x17c1): undefined reference to `cudaFreeHost'
cuYamaguchi.co: In function `init_gpu':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x1908): undefined reference to `cudaHostAlloc'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x192c): undefined reference to `cudaHostAlloc'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x193f): undefined reference to `cudaHostAlloc'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x195c): undefined reference to `cudaHostAlloc'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x1983): undefined reference to `cudaHostGetDevicePointer'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x19aa): undefined reference to `cudaHostGetDevicePointer'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x19c0): undefined reference to `cudaHostGetDevicePointer'
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text+0x19d6): undefined reference to `cudaHostGetDevicePointer'
cuYamaguchi.co: In function `cudaError cudaLaunch<char>(char*)':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text._Z10cudaLaunchIcE9cudaErrorPT_[cudaError cudaLaunch<char>(char*)]+0x11): undefined reference to `cudaLaunch'
cuYamaguchi.co: In function `__cudaSafeCall(cudaError, char const*, int)':
tmpxft_000032a2_00000000-1_cuYamaguchi.cudafe1.cpp:(.text._Z14__cudaSafeCall9cudaErrorPKci[__cudaSafeCall(cudaError, char const*, int)]+0x1c): undefined reference to `cudaGetErrorString'
collect2: ld returned 1 exit status