摘要: 先上一个C写的函数 check_dir.c编译:gcc –c –o checkdir.o check_dir.c在来一段fortran 调用的代码 iotils.f90编译 gfortran –c –o iotils.o iotils.f90主程序 test.f90编译 gfortran –c –o test.o test.f90链接 gfortran –o test.exe test.o checkdir.o 大功告成关键问题:fortran编译器在编译的时候会自动在函数名后面加一个_,解决方法有两个:1.给fortran 编译命令后面加一个编译参数,使之不自动产生下划线。2.在c函数声明中 阅读全文
posted @ 2010-12-20 09:53 chillwind 阅读(617) 评论(0) 推荐(0)