Today I ran into a problem linking my compiled cuda material. A.
I have uptodate debian testing since 2.6.32-3-amd64.
I worked all day on my code. compiles from time to time. there were no problems. but then after a minor code change, I got the following error:
gcc -o pa CUDA.o histogram256.o histogram64.o main.o -lrt -lm -lcudart -I. -I/data/cuda/include -I/data/cuda/C/common/inc -L/data/cuda/lib64 /usr/bin/ld: main.o: undefined reference to symbol 'std::basic_ifstream<char, std::char_traits<char> >::close()@@GLIBCXX_3.4' /usr/bin/ld: note: 'std::basic_ifstream<char, std::char_traits<char> >::close()@@GLIBCXX_3.4' is defined in DSO /usr/lib64/libstdc++.so.6 so try adding it to the linker command line /usr/lib64/libstdc++.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status
I changed the code back, but the error remained.
lib where it should be. (/ usr / lib64 is associated with / usr / lib)
ldd /usr/lib/libstdc++.so.6 linux-vdso.so.1 => (0x00007fff31fff000) libm.so.6 => /lib/libm.so.6 (0x00007f15f625a000) libc.so.6 => /lib/libc.so.6 (0x00007f15f5ef9000) /lib64/ld-linux-x86-64.so.2 (0x00007f15f680d000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f15f5ce2000)
hope someone has some good advice.
source share