我正在嘗試編譯使用PARDISO的線性系統求解器。 測試用例(pardiso_sym.c)也從上面的同一網站下載。使用GCC編譯PARDISO線性求解器測試案例
我有目錄中的以下文件:
[[email protected] my-pardiso]$ ls -lh
total 1.3M
-rw-r--r-- 1 gv hgc0746 1.3M Aug 7 11:59 libpardiso_GNU_IA64.so
-rw-r--r-- 1 gv hgc0746 7.2K Nov 13 2007 pardiso_sym.c
然後我嘗試用下面的命令來編譯:
[[email protected] my-pardiso]$ gcc pardiso_sym.c -o pardiso_sym -L . -llibpardiso_GNU_IA64.so -L/home/gv/.boost/include/boost-1_38 -llapack
但它給這個錯誤:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/bin/ld:
cannot find -llibpardiso_GNU_IA64.so
collect2: ld returned 1 exit status
我的編譯方法有什麼問題?
這是我的系統的附加信息:
[[email protected] my-pardiso]$ uname -a
Linux gw05 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 19:32:05 EDT 2008
x86_64 x86_64 x86_64 GNU/Linux
[[email protected] my-pardiso]$ gcc --version
gcc (GCC) 4.3.2
更新:
庫使用戴夫賭博的建議的認可。但現在它給不同 錯誤:
$ gcc pardiso_sym.c -o pardiso_sym -L . -lpardiso_GNU_IA64 -L/home/gv/.boost/include/boost-1_38 -llapack
./libpardiso_GNU_IA64.so: undefined reference to `s_stop'
./libpardiso_GNU_IA64.so: undefined reference to `s_wsfe'
./libpardiso_GNU_IA64.so: undefined reference to `e_wsfe'
./libpardiso_GNU_IA64.so: undefined reference to `z_abs'
./libpardiso_GNU_IA64.so: undefined reference to `s_cat'
./libpardiso_GNU_IA64.so: undefined reference to `s_copy'
./libpardiso_GNU_IA64.so: undefined reference to `do_fio'
@DG:謝謝。但它仍然給出同樣的錯誤。 – neversaint 2009-08-07 03:41:24
@DG:再次感謝。現在它認識到lib。任何想法是什麼新錯誤的可能原因(見更新)? – neversaint 2009-08-07 04:52:13