混合编程 [英] mix programming

查看:61
本文介绍了混合编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将C ++与fortran一起使用.
在Windows操作系统上使用混合编程(特别是fortran和c ++)是否有任何限制?
并且可以在Windows上运行用linux编写的程序吗?

I want to use C++ with fortran.
Whether have any limitation on the windows operating system to use mix programming especially fortran & c++?
And can run a program written that linux,on windows?

推荐答案

您可以将C ++和Fortran混合使用-如果您想使用其中的一些功能则特别方便C ++程序中用Fortran编写的高速数值库.

如何执行取决于您的编译器和构建环境.并且只要您不使用任何操作系统功能,就不会比用单一语言编写的代码在将代码从OS移植到OS上困难得多.

干杯,

Ash
You can mix C++ and Fortran - it''s especially handy if you want to use some of the high speed numerical libraries written in Fortran in C++ programs.

How you do it depends on your compilers and build environment. And provided you don''t use any OS facillities you''ll have no more difficulty porting code from OS to OS than you would with code written in a single language.

Cheers,

Ash


如果程序仅是控制台,则可以将其编译为Windows.如果它使用任何类型的窗口或其他外部库,则可能会遇到麻烦.我不知道如何让Fortran和C ++交谈,但是如果Fortran可以使用命名管道,WM_COPYDATA消息,COM等,那么您应该能够找到一种方法.
If a program is console only, then you can compile it for windows. If it uses any sort of window or other external library, you may have trouble. I have no idea how you''d get Fortran and C++ to talk, but if the Fortran can use named pipes, WM_COPYDATA messages, COM, etc, then you should be able to find a way.


这篇关于混合编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆