[問題] USE IMSL 變成USE NUMERICAL_LIBRARY

看板Fortran作者 (illiway)時間16年前 (2008/09/17 18:38), 編輯推噓1(104)
留言5則, 3人參與, 最新討論串1/1
想請問版上高手~ 以前CVF時,都在程式開頭用USE IMSL 之後才能call IMSL的函式 我有看到換成IVF後,要改成 USE NUMERICAL_LIBRARY 可是我改成 USE NUMERICAL_LIBRARY 卻不能用(出現錯誤) 一定要用我前一篇提的 Include 'link_fnl_shared.h' 才可以執行 我是不是在哪個地方設定錯了 有高手可以指點我一下嗎?? 以下附上一個例子,我是隨便複製IMSL pdf檔中其中一個例子 出現的錯誤是 Error 1 Error The same named entity from different modules and /or program units cannot be referenced. [CSCON] Error 2 Error The same named entity from different modules and /or program units cannot be referenced. [WRRRL] Error 3 Error: The same named entity from different modules and /or program units cannot be referenced. [UMACH] Error 4 Compilation Aborted (code 1) ---- PROGRAM main !Include 'link_fnl_shared.h' [用這一個的話,可以執行] USE NUMERICAL_LIBRARIES [用這一個的話,會出現錯誤] USE CSCON_INT USE UMACH_INT USE WRRRL_INT IMPLICIT NONE ! Specifications INTEGER NDATA PARAMETER (NDATA=9) ! INTEGER IBREAK, NOUT REAL BREAK(2*NDATA), CSCOEF(4,2*NDATA), FDATA(NDATA),& XDATA(NDATA) CHARACTER CLABEL(14)*2, RLABEL(4)*2 ! DATA XDATA/0.0, .1, .2, .3, .4, .5, .6, .8, 1./ DATA FDATA/0.0, .9, .95, .9, .1, .05, .05, .2, 1./ DATA RLABEL/' 1', ' 2', ' 3', ' 4'/ DATA CLABEL/' ', ' 1', ' 2', ' 3', ' 4', ' 5', ' 6',& ' 7', ' 8', ' 9', '10', '11', '12', '13'/ ! Compute cubic spline interpolant CALL CSCON (XDATA, FDATA, IBREAK, BREAK, CSCOEF) ! Get output unit number CALL UMACH (2, NOUT) ! Print the BREAK points and the ! coefficients (CSCOEF) for ! checking purposes. WRITE (NOUT,'(1X,A,I2)') 'IBREAK = ', IBREAK CALL WRRRL ('BREAK', BREAK, RLABEL, CLABEL, 1, IBREAK, 1, FMT='(F9.3)') CALL WRRRL ('CSCOEF', CSCOEF, RLABEL, CLABEL, 4, IBREAK, 4, FMT='(F9.3)') END -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.223.153 ※ 編輯: illiway 來自: 140.113.223.153 (09/17 18:41)

09/18 03:34, , 1F
Project setting link 添加以下
09/18 03:34, 1F

09/18 03:34, , 2F
imsl.lib imsls_err.lib imslmpistub.lib kernel32.lib
09/18 03:34, 2F

09/18 10:00, , 3F
非常感謝樓上的回答,但有沒有人可以告訴我,要從哪設訂>
09/18 10:00, 3F

09/18 11:06, , 4F
以我的經驗 加include 'link_fnl_shared.h ' 是對的
09/18 11:06, 4F

09/18 11:07, , 5F
我從來沒加過 USE NUMERICAL_LIBRARY
09/18 11:07, 5F
文章代碼(AID): #18qDuhIQ (Fortran)
文章代碼(AID): #18qDuhIQ (Fortran)