|
5#

楼主 |
发表于 2021-3-4 10:50:37
|
只看该作者
按照视频教程中的内容,在文件前面加了include,头文件是Include文件夹下的,但是出现了错误
[Fortran] 纯文本查看 复制代码 01 | include 'link_fnl_static.h' |
07 | integer , parameter :: n = 32 |
08 | real ( kind ( 1 e 0 ) ) , parameter :: one = 1 e 0 |
10 | real ( kind ( 1 e 0 ) ) A ( n , n ) , b ( n , n ) , x ( n , n ) , res ( n , n ) , y ( n * * 2 ) |
14 | A = reshape ( y , ( / n , n / ) ) |
17 | b = reshape ( y , ( / n , n / ) ) |
19 | call lin_sol_gen ( A , b , x ) |
报错如下
错误 1 error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invalid_parameter@@YAXPBG00II@Z) 已经在 LIBCMTD.lib(invarg.obj) 中定义 LIBCMT.lib(invarg.obj)
错误 2 error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invoke_watson@@YAXPBG00II@Z) 已经在 LIBCMTD.lib(invarg.obj) 中定义 LIBCMT.lib(invarg.obj)
错误 3 error LNK2005: __call_reportfault 已经在 LIBCMTD.lib(invarg.obj) 中定义 LIBCMT.lib(invarg.obj)
等等
然后我删掉了include那行,把lib下的大部分文件名都加入到工程文件的link-input下面,程序可以正常跑了。只是不知道为什么我加的这个Include这行不能正常运行呢?
|
|