简体   繁体   English

将复杂的数据类型从C#传递到fortran dll

[英]pass complex datatype from c# to fortran dll

i have a subroutine in fortran 77 with input of complex data type .I created dll of fortran and added dll to c# project. 我在fortran 77中有一个子程序,具有复杂数据类型的输入。我创建了fortran的dll,并将dll添加到了c#项目中。

how i pass complex datatype to fortran dll? 我如何将复杂的数据类型传递给fortran dll?

is there any complex type library that compatible with fortran?(i use complex type of math.net library) 是否有与fortran兼容的复杂类型库?(我使用math.net库的复杂类型)

You should probably create the complex data type as a struct (and all the other complex sub-types) (rather than a class). 您可能应该将复杂数据类型创建为结构(以及所有其他复杂子类型)(而不是类)。 This will mean it's a data only DTO. 这将意味着它是仅数据DTO。 There may be extra things you need to do to align things on the correct boundaries but there are suitable attributes for this sort of thing. 可能需要做一些额外的事情才能使事物在正确的边界上对齐,但是这类事物具有适当的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM