|
I just want to test mixed programming with C/F, but i failed.
F subroutine subf.f90
[Fortran] 纯文本查看 复制代码 1 | Integer Function Add ( A , B ) Bind ( C , Name = "Add" ) |
2 | use , Intrinsic :: ISO_C_Binding |
4 | integer , value :: A , B |
C main test.cpp
[C] 纯文本查看 复制代码 2 | extern "C" int Add( int A, int B); |
makfile
ERR
[Make] 纯文本查看 复制代码 1 | test .o: In function `main': |
2 | test .cpp:(.text+0x35): undefined reference to `Add(int, int)' |
3 | Makefile:5: recipe for target 'test' failed |
where did it all go wrong?
|
|