|
现在我是想使用fortran写这个函数,写为fortran后,再调用c中的一个函数,将这个改写的fortran子程序的地址传递给c函数。
用gfortran的话,参考
https://gcc.gnu.org/onlinedocs/g ... rking-with-Pointers
If a pointer is a dummy-argument of an interoperable procedure, it usually has to be declared using the VALUE attribute. void* matches TYPE(C_PTR), VALUE, while TYPE(C_PTR) alone matches void**.
现成的例子都有,之前也贴过了,lz估计日理万机,也就无暇他顾了。。。 |
|