- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cgwrite.obj : error LNK2019: unresolved external symbol _cg_goto_f referenced in function _MAIN__
cgwrite.obj : error LNK2019: unresolved external symbol _cg_array_write_f referenced in function _MAIN__
The symbols in question are the only ones that use
!DEC$ ATTRIBUTES REFERENCE, C, VARYING :: cg_goto_f
!DEC$ ATTRIBUTES REFERENCE, C, VARYING :: cg_array_write_f
I am not the author of the code but I thinkthe above are usedbecause these calls have variable argument lists. I have tried capitalizing them in the FORTRAN but it does not help. The calls are being made to
_declspec(dllexport) void CG_GOTO_F(cgsize_t *fn, cgsize_t *B, cgsize_t *ier, ...)
I am using IVF 11.1.065 and MSVS 2005.
Hope somebody can set me straight.
Thanks
Greg
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
, DECORATE,ALIAS:"CG_GOTO_F"
and
,DECORATE,ALIAS:"CG_ARRAY_WRITE_F"
to get uppercase names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Thanks for your help. You got me on the right track but with the DECORATE it kept telling me "Only a function or subroutine subprogram may have the !DEC$ ATTRIBUTES directive DECORATE specifier". I ended up decorating the subroutine name myself and it compiles and links.
!DEC$ ATTRIBUTES REFERENCE, C, VARYING :: _cg_goto_f
I'll have to test to see that it works right but at least I am moving again. Getting C and FORTRAN to play nice is an ever constant journey for me. This is another brick in the wall I will have to record.
Thanks
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I strongly recommend use of DECORATE rather than adding the decoration manually as that means your code will be portable to x64.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page