2013-03-10 2 views
0

내 cuSparse 프로그램이 제대로 작동하는 동안 그러나 그것을 수정 한 후 나는 실수의 무리있어 :이상한 실수는 컴파일

/tmp/tmpxft_000014cd_00000000-14_Sample2.0.o: In function `main': 
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xb24): undefined reference to `cusparseCreate' 
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xb68): undefined reference to `cusparseCreateMatDescr' 
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xbb4): undefined reference to `cusparseSetMatType' 
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xbc8): undefined reference to `cusparseSetMatIndexBase' 
tmpxft_000014cd_00000000-3_Sample2.0.cudafe1.cpp:(.text+0xc60): undefined reference to `cusparseScsrmv_v2' 

그게 무슨 뜻 이죠를? 프로그램의 main() 함수가 꽤 엉망이되었습니다. 이러한 실수가 어떻게 든 그것에 연결될 수 있습니까? 프로그램을 여러 부분으로 나누어야합니까?

+2

변경 사항은 무엇입니까? 이것은 cuSparse 라이브러리에 대한 링크/액세스가 없음을 의미합니다. –

답변

0

링커에서 이러한 함수에 대한 정의가 누락되었다고 말합니다. 이 기능을 정의 했습니까? 이름의 철자가 정확합니까?

// jk

+0

죄송합니다. 나는 그 질문에 대해 유감스럽게 생각합니다. 컴파일하는 동안 -lcusparse를 추가하는 것을 잊었습니다. – Max