找回密码
 注册
Simdroid-非首页
查看: 310|回复: 8

[2. C/C++/C#] 求助:如何将fortran转换成c程序?谢谢!

[复制链接]
发表于 2005-4-11 19:24:31 | 显示全部楼层 |阅读模式 来自 大连理工大学
有没有好的软件呢?难道要自己一句句的翻译吗 ?非常感谢!
发表于 2005-4-12 04:53:06 | 显示全部楼层 来自 美国

Re:求助:如何将fortran转换成c程序?谢谢!

Simdroid开发平台
search f2c
发表于 2005-4-12 08:53:30 | 显示全部楼层 来自 同济大学

有将c转换为fortran的程序么?

如题,请教freepu,多谢!
 楼主| 发表于 2005-4-12 10:05:05 | 显示全部楼层 来自 大连理工大学

Re:求助:如何将fortran转换成c程序?谢谢!

f2c
怎么样用呢? 我不会用,转换后的差别太大了,能否告知一下,谢谢!
suolun 该用户已被删除
发表于 2005-4-12 11:05:49 | 显示全部楼层 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2005-4-20 07:31:55 | 显示全部楼层 来自 山东青岛

Re:求助:如何将fortran转换成c程序?谢谢!

到百度搜一下
发表于 2005-4-23 04:17:17 | 显示全部楼层 来自 美国

Re:求助:如何将fortran转换成c程序?谢谢!

我就传一下吧

http://www.weihenstephan.de/~syring/f2c/f2c.html

This is an adaption of the Fortran77 to C translator f2c from netlib. The f2c "compiler" works as expected, the only deviation from the original documentation is in the fact that you can not use a *.f file specifier, i.e. it will compile only one source file at a time. I have included a slightly modified f2c.h include file that conditionally undefines huge etc. modifiers.
The compiler produces C code that must be linked against the runtime libraries libf77.lib and libi77.lib. While the translator itself runs in native Win32 mode, it may be necessary to install the Downhill library available at  http://www.accurev.com/free/u2nt/ (a lightweight Un*x to Win32 compatibility library) if you get unresolved externals during linking.

Download:
Binary:
    f2c.exe, f2c.h, libi77.lib, libf77.lib

Source:
    contains the "binaries" together with the source and a test program

Remarks on building:
A sample Fortran test program is provided with the source distribution. The Fortran source is translated to C by VC5 custom build step and the resulting C program is compiled with the -MD option to link with libf77.lib and libi77.lib.
There is a potential problem with the binary/text dichotomy of the file opening modes. To be on the safe side, I would recommend to link your program with binmode.obj to set the default file mode to binary. In general, this required if your Fortran program uses a BACKSPACE.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2005-5-2 22:50:36 | 显示全部楼层 来自 上海大学

Re:求助:如何将fortran转换成c程序?谢谢!

好东西,谢谢分享!
发表于 2005-5-26 18:18:25 | 显示全部楼层 来自 四川巴中

Re:求助:如何将fortran转换成c程序?谢谢!

太好了,以前总是一行一行改。
感谢了。
就是不知道效果如何?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-11-2 01:23 , Processed in 0.046616 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表