Thanks txbob. I realized this after replying to you and observed that there is a function defintion in file “cudaSiftH.cu”. Now, i added all the *.cu and *.h files within folder in above weblink except the file “mainSift.cpp”. Instead of this file i am trying to test the lines of code i have shared above. Now i get lot of other errors as below:
/usr/local/cuda-7.5/bin/nvcc --cudart static -L/usr/local/lib --relocatable-device-code=false -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=compute_35 -gencode arch=compute_50,code=compute_50 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -link -o “SIFT_GPU” ./cudaImage.o ./cudaSiftD.o ./cudaSiftH.o ./geomFuncs.o ./matching.o ./sift_gpu_v1.o -lopencv_cudabgsegm -lculibos -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_shape -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_video -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_cudaarithm -lopencv_core -lopencv_cudev -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_calib3d -lopencv_features2d -lopencv_objdetect -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudawarping
./cudaSiftH.o: In function ScaleDown(float*, float*, int, int, int, int)': cudaSiftD.cu:26: multiple definition of
ScaleDown(float*, float*, int, int, int, int)’
./cudaSiftD.o:cudaSiftD.cu:26: first defined here
./cudaSiftH.o: In function ScaleUp(float*, float*, int, int, int, int)': cudaSiftD.cu:102: multiple definition of
ScaleUp(float*, float*, int, int, int, int)’
./cudaSiftD.o:cudaSiftD.cu:102: first defined here
./cudaSiftH.o: In function ComputeOrientations(unsigned long long, SiftPoint*, int)': cudaSiftD.cu:360: multiple definition of
ComputeOrientations(unsigned long long, SiftPoint*, int)’
./cudaSiftD.o:cudaSiftD.cu:360: first defined here
./cudaSiftH.o: In function ExtractSiftDescriptors(unsigned long long, SiftPoint*, int, float)': cudaSiftD.cu:128: multiple definition of
ExtractSiftDescriptors(unsigned long long, SiftPoint*, int, float)’
./cudaSiftD.o:cudaSiftD.cu:128: first defined here
./cudaSiftH.o: In function RescalePositions(SiftPoint*, int, float)': cudaSiftD.cu:349: multiple definition of
RescalePositions(SiftPoint*, int, float)’
./cudaSiftD.o:cudaSiftD.cu:349: first defined here
./cudaSiftH.o: In function LowPass(float*, float*, int, int, int)': cudaSiftD.cu:632: multiple definition of
LowPass(float*, float*, int, int, int)’
./cudaSiftD.o:cudaSiftD.cu:632: first defined here
./cudaSiftH.o: In function LaplaceMultiMem(float*, float*, int, int, int)': cudaSiftD.cu:603: multiple definition of
LaplaceMultiMem(float*, float*, int, int, int)’
./cudaSiftD.o:cudaSiftD.cu:603: first defined here
./cudaSiftH.o: In function FindPointsMulti(float*, SiftPoint*, int, int, int, int, float, float)': cudaSiftD.cu:444: multiple definition of
FindPointsMulti(float*, SiftPoint*, int, int, int, int, float, float)’
./cudaSiftD.o:cudaSiftD.cu:444: first defined here
./cudaSiftH.o: In function __device_stub__Z9ScaleDownPfS_iiii(float*, float*, int, int, int, int)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:19: multiple definition of
__device_stub__Z9ScaleDownPfS_iiii(float*, float*, int, int, int, int)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:19: first defined here
./cudaSiftH.o: In function __device_stub__Z7ScaleUpPfS_iiii(float*, float*, int, int, int, int)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z7ScaleUpPfS_iiii(float*, float*, int, int, int, int)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function __device_stub__Z22ExtractSiftDescriptorsyP9SiftPointif(unsigned long long, SiftPoint*, int, float)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z22ExtractSiftDescriptorsyP9SiftPointif(unsigned long long, SiftPoint*, int, float)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function __device_stub__Z25ExtractSiftDescriptorsOldyP9SiftPointif(unsigned long long, SiftPoint*, int, float)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z25ExtractSiftDescriptorsOldyP9SiftPointif(unsigned long long, SiftPoint*, int, float)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function ExtractSiftDescriptorsOld(unsigned long long, SiftPoint*, int, float)': cudaSiftD.cu:232: multiple definition of
ExtractSiftDescriptorsOld(unsigned long long, SiftPoint*, int, float)’
./cudaSiftD.o:cudaSiftD.cu:232: first defined here
./cudaSiftH.o: In function __device_stub__Z16RescalePositionsP9SiftPointif(SiftPoint*, int, float)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z16RescalePositionsP9SiftPointif(SiftPoint*, int, float)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function __device_stub__Z19ComputeOrientationsyP9SiftPointi(unsigned long long, SiftPoint*, int)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z19ComputeOrientationsyP9SiftPointi(unsigned long long, SiftPoint*, int)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function __device_stub__Z15FindPointsMultiPfP9SiftPointiiiiff(float*, SiftPoint*, int, int, int, int, float, float)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z15FindPointsMultiPfP9SiftPointiiiiff(float*, SiftPoint*, int, int, int, int, float, float)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function __device_stub__Z15LaplaceMultiTexyPfiii(unsigned long long, float*, int, int, int)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z15LaplaceMultiTexyPfiii(unsigned long long, float*, int, int, int)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function LaplaceMultiTex(unsigned long long, float*, int, int, int)': cudaSiftD.cu:571: multiple definition of
LaplaceMultiTex(unsigned long long, float*, int, int, int)’
./cudaSiftD.o:cudaSiftD.cu:571: first defined here
./cudaSiftH.o: In function __device_stub__Z15LaplaceMultiMemPfS_iii(float*, float*, int, int, int)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z15LaplaceMultiMemPfS_iii(float*, float*, int, int, int)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./cudaSiftH.o: In function __device_stub__Z7LowPassPfS_iii(float*, float*, int, int, int)': /tmp/tmpxft_00001179_00000000-10_cudaSiftH.compute_30.cudafe1.stub.c:1: multiple definition of
__device_stub__Z7LowPassPfS_iii(float*, float*, int, int, int)’
./cudaSiftD.o:/tmp/tmpxft_00001108_00000000-10_cudaSiftD.compute_30.cudafe1.stub.c:1: first defined here
./sift_gpu_v1.o: In function main': sift_gpu_v1.cpp:44: undefined reference to
InitCuda’
collect2: error: ld returned 1 exit status
make: *** [SIFT_GPU] Error 1
Could you please the mistake ?
Thanks
SIFT_GPU.zip (8.07 MB)