intel Fortran 调用VC创建的Lib
Vc建立lib项目
//Mydll.cpp
#include <stdio.h>
#define Maxx MAXX
#define Minn MINN
extern "C"
{
int Maxx(int a, int b)
{
if(a >= b)return a;
else
return b;
}
int Minn(int a, int b)
{
if(a >= b)return b;
else
return a;
}
}
intel Fortran 调用:
program main !(可要或者不要)
inte易做图ce
integer function maxx(a,b)
integer a,b
!ms$attributes c,alias:'_MAXX':: maxx
end function maxx
integer function minn(a,b)
integer a,b
!ms$attributes c,alias:'_MINN':: minn
end function minn
end inte易做图ce
integer aa,bb,cx,cd
aa=12
bb=21
cd=maxx(aa,bb)
cx=minn(aa,bb)
write(*,*)cx,cd
end program
补充:软件开发 , C++ ,