- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello expert,
A silly question, my fortran project is a Windows DLL. It exports a function called 'polyfit'. Calling the function from excel works fine. However, when I want to call this function from my own DLL .. I'm not even able to compile. Error is 'unresolved external symbol'.
I guess I'm not allowed to call from my own DLL a function which is exported. Then how should I do it ?
The export code is the following :
!MS$IF DEFINED (_DLL) !MS$ATTRIBUTES DLL EXPORT :: polyfit !MS$ATTRIBUTES STDCALL,ALIAS:'polyfit' :: polyfit .... arguments .... !MS$ENDIF
The calling code from inside fortran is simply :
CALL POLYFIT( ....)
Thanks,
Vincent
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your calling code needs to know the attributes of the thing that it is calling - particularly that it has the STDCALL attribute and [perhaps] that you've set an alias for the name of the procedure. If the procedure is in a module (?), then the USE of the module provides this, otherwise you need an interface block.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page