- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'm testing a mixed programming (fortran main and calling c function).
The fortran file (a.f) is as follows.
program test
external ddd
call ddd(5,iii)
write(*,*) iii
end
The c file (b.c) is as follows.
#include <io.h>
void ddd_(int *i,int *j){
*j=*i;
}
Then, compiling and building was performed on the "intel oneAPI command prompt for IA32 for visual studio 2022" as follows.
D:\code\test>cl -c b.c
D:\code\test>ifort -c a.f
D:\code\test>ifort b.obj a.obj
But, linking error (LNK2019) occurred as follows.
a.obj: error LNK2019: _DDD_MAIN__....
Could you help about the linking problem?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page