- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an IVF project where one f90 subroutine calls a C subroutine as:
! For SuperLU, use the previously stored matrix factorization from the
! primal problem.
!
call c_fortran_zgssv_( 2, 2*nnod, nnz, 1, val,col,irw, &
& ewt, 2*nnod, factors, info )
I have created a static library containing
void
c_fortran_zgssv_(int *iopt, int *n, int *nnz, int *nrhs,
doublecomplex *values, int *rowind, int *colptr,
doublecomplex *b, int *ldb,
fptr *f_factors, /* a handle containing the address
pointing to the factored matrices */
int *info)
in C:mhoversmare2d_v2SuperLU_3.0Fortran_linkReleaseFortran_link.lib
In my IVF Project Properties -> Linker -> General->Additional Library Directories I have the path to the *.lib files
C:mhoversmare2d_v2SuperLU_3.0Fortran_linkRelease
In Tools->Options->Intel Fortran ->General -> Libraries I have:
C:mhoversmare2d_v2SuperLU_3.0Fortran_linkRelease (in addition to all the default stuff)
I have also played with adding/subtracting _ before and after the routine name but no mater what I get error LINK2019: unresolved external symbol _C_FORTRAN_ZGSSV
Is there somewhere else I need to tell it to find the *.lib or somewhere I have to explicitly name the Fortran_link.lib that contains the C object??
Thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
or
add a !DEC$ OPTIONS LIB:'Fortran_link.lib' to one of the sources
or
add the .lib to the project as if it were a source file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Several equivalent tools can be used to examine the C and Fortran .obj files to check that the linkage names match.
![](/skins/images/3CECF0550DB8BF54496C114A1FF06FE9/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page