- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I have been working on porting several 32bit projects to 64bit platform. Tthe main program is a C\C++ project and it calls Fortran functions (similarly, some of Fortran functions call C\C++ functions as well). Projects compile and link juts fine for 32x. Once, I change it to it to 64x, I am getting lots of unresolved external symbol errors like this one
1>Interface_Linear_Direct_Integration_X.obj : error LNK2019: unresolved external symbol Print_decomp_message referenced in function "void __cdecl monitorf(class AG_SparseSymMatrix *,void *)" (?monitorf@@YAXPEAVAG_SparseSymMatrix@@PEAX@Z)
1>Interface_X.obj : error LNK2001: unresolved external symbol Print_decomp_message
And, the Fortran function "Print_decomp_message" is defined like this:
SUBROUTINE Print_decomp_message(IMSG,NEQN,DIAG_NEW,DIAG_OLD)
!MS$ATTRIBUTES c,alias: '_Print_decomp_message'::Print_decomp_message
I am using MS VS2013 and Intel Fortran (Parallel Studio XE 2015 Composer Edition, for Fortran Windows). I am guessing that this problem is somehow related to function name decorating (mangling) but I could not figure it out yet.
I am not quite familiar with Fortran language so any help, suggestion, or reference to some materials documents are greatly appreciated.
Regards
Bulent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
While using the standard iso_c_binding mechanisms would be *best*, this is the quickest solution to get you going.
change this:
!MS$ATTRIBUTES c,alias: '_Print_decomp_message'::Print_decomp_message
to this:
!MS$ATTRIBUTES c,alias: 'Print_decomp_message', decorate ::Print_decomp_message
--Lorri
Link Copied
- 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
While using the standard iso_c_binding mechanisms would be *best*, this is the quickest solution to get you going.
change this:
!MS$ATTRIBUTES c,alias: '_Print_decomp_message'::Print_decomp_message
to this:
!MS$ATTRIBUTES c,alias: 'Print_decomp_message', decorate ::Print_decomp_message
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lorri
Thanks a lot. this solution fixed my problem.
Regards
Bulent
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page