[英]Can't compile and link library
我嘗試使用基於fortran代碼的名為matlisp的gcc編譯的庫。 指定f77編譯器后,我可以執行autoreconf,configure和make命令來獲取文件libmatlisp.so。
但是當我嘗試使用它時,我得到:
Error opening shared object ".../libmatlisp.so":
/usr/lib/libf2c.so.2: undefined symbol: MAIN__.
當我執行命令ld libmatlisp.so時,我得到:
...
libmatlisp.so: undefined reference to `idamax_'
libmatlisp.so: undefined reference to `dger_'
/usr/lib/libf2c.so.2: undefined reference to `MAIN__'
libmatlisp.so: undefined reference to `zscal_'
libmatlisp.so: undefined reference to `dscal_'
....
有辦法改善這種情況嗎?
我已經嘗試過此解決方案,但是它不起作用。
我也嘗試將編譯器更改為gfortran,但遇到一些運行時錯誤消息,其中提到了libf2c缺少的庫。
好。 我使用的是Matlisp 2012而不是2003的較新版本,現在它可以在我的環境中正常運行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.