- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm working on a mixed Fortran/C project using ifort and icc v12.1 respectively. I've found while working on this project, that it's pretty easy to make a mistake with the number of parameters or types when calling C functions in Fortran. The linker seems happy as long as the name in the function call matches a function at link-time.
Is there anyway to have the linker through an error when the arguments mismatch? I've found the -warn interface system in ifort for intra-Fortran calls but obviously this works significantly differently by searching mod files.
Here's an example program:
Fortran:
[fortran]program main implicit none real val val = 3.0 CALL multi(val, 5.0) PRINT *, val end program main[/fortran]C:
[cpp]void multi_(float * a) { *a *= 5.0f; } [/cpp]
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - there is no information the linker can use for this purpose.

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