1

プログラムを正しくリンクできません。次のコマンドラインを使用しましたが、エラーが発生します。

g++ -I/home/blah/intel/composerxe/mkl/include dotProduct.cpp /home/blah/intel/composerxe/mkl/lib/intel64/libmkl_core.a

出力は次のとおりです。

/tmp/ccvw6w13.o: In function `main':
dotProduct.cpp:(.text+0x108): undefined reference to `cblas_sdot'
collect2: ld returned 1 exit status

また、すべての.aファイルに対して1つずつリンクしようとするスクリプトを実行しようとしましたが、すべて失敗します。誰かが解決策を提案できますか?ありがとう。

4

1 に答える 1

1

Intel の KB 記事は次のとおりです。

http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-linux-linking-applications-with-intel-mkl-version-100/

余談ですが、gcc の代わりに Intel コンパイラを使用できる場合、これは機能します (少なくとも私には機能します)。

icpcファイル-mkl

前にlがないことに注意してください。-mkl だけです。

于 2011-06-10T11:01:25.277 に答える