- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here it is the example I just prepared. It contains a ZIP file with three folders:
- FortTest project: it is a IVF Fortran project that generatesthe DLLwith the STDCALL calling convention in order to be used with the VB6 client project
- FortApp project: it is the IVF Fortran project that should use the former DLL with the STDCALL convention
- VBLaunch project: it is a Visual Basic 6 project that uses the DLL and has intrinsic STDCALL calling convention that cannot be modified
At now the VB6 project is able to call the DLL, but there's something wrong while passing the strings. However the FortApp project cannot be linked at all.
Do you have any advice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I noticed a very old thread where you discussed to use with Visual Basic 6these additional options in the Fortran project properties:
/dll /iface:cvf /iface:nomixed_str_len_arg
It seems to be the solution for both the scopes. There's only the ALIAS ATTRIBUTE, that is needed for the VB6 client application, whilst it is not tolerated by the Fortran client application.
It seems that such attribute associated to the exposed function makes an unresolved external symbol when linking the Fortran client application, so I need to change the source each time I compile for each target, commenting or uncommenting suchattribute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you use a compiler pre-processor directive for conditional compilation?
You could just wrap each source line(s) to beused for a specific targetwith a
!DEC$ if defined (FOO)
!DEC$ endif
and so on
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/2F496A9BF2E73260E2FDFDBCABF91248/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page