私はPythonから使用可能にする必要がある長いFortranコードを持っています。私はFortran->C->Pythonインターフェースを実行することにしました。
問題が発生しました:Fortranモジュール内に次のような派生型があります
double precision, allocatable
メンバーとして入力します。
ifortでコンパイルしようとすると、(gfortranで似たようなものが)得られます:
Each component of a derived type with the BIND attribute shall be a nonpointer,
nonallocatable data component with interoperable type and type parameters
これは、実際にはIntelコンパイラのドキュメントおよびFortran2003標準のポイント15.2.5と一致しています。
内部に割り当て可能またはポインタを使用してFortranの「タイプ」にアクセスする方法はありますか?