- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is it possible to DLLEXPORT an overloaded function from a DLL? If it is possible, how do I do it?
Thanks for any help,
Jon
Is it possible to DLLEXPORT an overloaded function from a DLL? If it is possible, how do I do it?
Thanks for any help,
Jon
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes - you don't DLLEXPORT the overloaded function itself, but rather each of the module procedures that implement the function for each signature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve. So, when I use the overloaded function name outside the DLL, Fortran knows which of the actual functions to use. Can I expect the same behavior if I call the overloaded function from a VB.NET application? Or will VB stall in this case?
Jon
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you USE the module in a Fortran program, the compiler knows about the individial specific procedures and their global names, so that's why you DLLEXPORT them.
If you are calling from a non-Fortran language, it has no concept of Fortran overloading - you have to tell it the exact exported name of the routine to call, which will be one of the specific procedures. You'll need to know how the compiler decorates that name unless you add an ALIAS attribute.
If you are calling from a non-Fortran language, it has no concept of Fortran overloading - you have to tell it the exact exported name of the routine to call, which will be one of the specific procedures. You'll need to know how the compiler decorates that name unless you add an ALIAS attribute.
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