- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I am dealing withmixed programming with fotran and C using MS VC++6.0 . I am writing C modules for a Tool written in Fortran. A C function calls a Fortran subroutine and this Fortran subroutine calls another subroutine which is defined in a fortran static library. And I add path of this library as an external library to Project/settings/link/category:Input/"Additional library path".
However, I have still a LNK2001 error-Unresolved external symbol _X_.
X is the called function(written in fortran) which is called by the fortran subroutine.
I am thinking that the 'unresolved external symbol error' is shown
only with one underscore that is _X. why there is the second underscore(_X_)? And I don't know how to solve this.
I would be very happy ifanyone can help me..
Cheers ,
Ayse
However, I have still a LNK2001 error-Unresolved external symbol _X_.
X is the called function(written in fortran) which is called by the fortran subroutine.
I am thinking that the 'unresolved external symbol error' is shown
only with one underscore that is _X. why there is the second underscore(_X_)? And I don't know how to solve this.
I would be very happy ifanyone can help me..
Cheers ,
Ayse
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your C code is written for the usual BSD/f2c calling convention (as used by Intel linux compilers), it may have the underscore appended explicitly, or by some #define pre-processing. If so, you will need to adjust the names either in your C or your Fortran code so they match. The Windows utility
dumpbin /symbols *.obj
should help you determine what is needed to make them match.

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