- 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
The issue happens because CreateWindowEx, LoadIcon, and LoadMenu are Windows API functions, not built-in Fortran routines. If the compiler can’t recognize them, it usually means the Windows API libraries or interfaces are not linked/included.
Possible reasons:
Missing Windows API interface/module.
Required libraries (like user32) are not linked.
Compiler update removed old compatibility modules.
Fix:
Link the user32 library when compiling.
Include the proper Win32 API interface in your Fortran code.
Alternative:
You can also use GUI libraries such as GTK for Fortran instead of calling the Windows API directly.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- 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
Shouldn't have stated latest IVF, rather the IVF version a couple of years ago.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, I also looked, one that perturbed me was:
interface !lib=ifwin.lib
integer(4) function convertFtoCstring(cstring,fstring);
!DEC$ ATTRIBUTES DEFAULT :: convertFtoCstring
!DEC$ IF DEFINED(_M_IX86)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_convertFtoCstring@8' :: convertFtoCstring
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'convertFtoCstring' :: convertFtoCstring
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE::cstring
character *(*) cstring
integer fstring
end function convertFtoCstring
end interfaceWhich is in IFWBASE.f90 in his code this routine is called with (in effect) loc(fortran string). I am guessing this worked in 32 bit which suggests to me that this interface is probably bad but not seeing any documentation then who knows?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that "integer fstring" is certainly suspicious. TBH, I had never run across this routine before - like the rest of IFWBASE its origins are Microsoft Fortran PowerStation. The name of the function is confusing, as it is being used to copy a C string from an OPENFILENAMEA structure to a local character variable (a Fortran string). None of the provided Windows API samples use it.
In any case, I agree with you that the interface is bad. It would not be difficult to come up with a function written in Fortran to replace it. If I were doing this, I'd add a "rename" to USE IFWBASE to hide the bad interface, for example:
use ifwbase, donotuse => ConvertFtoCstringthen I would declare my own function by that name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ivf_ian Is that collection of Optisoft files complete? Can you tell me which file contains the main program? I couldn't find it...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »