I am a bit of an old fashioned command line programmer and struggle how to deal with DLLs . Do I integrate them via Plato? If so, where are they referenced in Plato? I have also tried direct linking following the advise in https://www.silverfrost.com/ftn95-help/slink/direct_linking_with_dlls.aspx , but can't get that to work.
Use of DLLs
From the command line, just specify the name of the DLL to the linker, as you would a static library. For example, if you write MyProg.F90, and that contains calls to one or more routines in TheirLib.DLL, do
FTN95 MyProg.F90
SLINK MyProg.obj TheirLib.DLL
That's exactly what I did but it did not work.
So I created a map file and it contains stuff like
EDATE@ - CLEARWIN64.DLL R4@WSF - CLEARWIN64.DLL SLEEP@ - CLEARWIN64.DLL
which in my view would indicate that the clearwin DLL is correctly linked
however there is a whole list of calls unresolved (see below) and those are clearwin calls as faras I understand from eg https://www.silverfrost.com/ftn95-help/clearwinp/library/rotate_font_.aspx
what am I missing ??????
ROTATE_FONT@ Unresolved - DRAW_POINT@ Unresolved - DRAW_FILLED_ELLIPSE@ Unresolved - SIZE_IN_PIXELS@ Unresolved - BOLD_FONT@ Unresolved - DRAW_RECTANGLE@ Unresolved - SET_LINE_WIDTH@ Unresolved - DRAW_FILLED_RECTANGLE@ Unresolved - DRAW_CHARACTERS@ Unresolved - DRAW_LINE_BETWEEN@ Unresolved - SET_MOUSE_CURSOR_POSITION@ Unresolved - ADD_MENU_ITEM@ Unresolved -
The fact that the missing externals have uppercase names and are decorated with '@' indicates that you forgot to USE CLRWIN or INCLUDE 'CLEARWIN.INS' in your source code.
I had included already
use clrwin$
which is the 64 bit version of clearwin.ins (see https://www.silverfrost.com/ftn95-help/clearwinp/util/64bit.aspx)
Still getting teh same error on unresolved calls to various functions as per previous post
I now replaced the use clrwin$ statement everywhere with
include <windows.ins>
and that fixes the unresolved calls.
Not sure however how this will work out for 64 bit as I understand that windows.ins was only for 32 bit ????
So big step forward, but ....
Ok finally got sorted, I think. For 64 option the @ in the function calls need to be replaced by $ and than things seem to work w use clrwin$
For FTN95 you should use @ and USE CLRWIN. For gFortran (or both FTN95 and gFortran) you should use $ and USE CLRWIN$.
Thanks, but I am still a bit confused
From the clearwin users guide https://www.silverfrost.com/ftn95-help/clearwinp/util/64bit.aspx i understood that for the 64 bit version (of ftn95) I have to use clrwin$ and function calls ending in the $ sign.
But from the last comment I understand that for ftn95 64 bit I can also use clrwin and function calls ending in @
Is there any problem using the clrwin $ everywhere? (ie for ftn95 bit and other 64 bit fortran compilers?)
jcherw
The link that you provided describes how to access ClearWin+ from third party compilers such as gFortran.
For the most part you can use \(with FTN95 but it is simpler to use @ because almost all of the documentation uses @ and this is the native and historical approach. Also you might find the odd thing here and there that does not work with\).
Ok - thanks a lot all who commented. I'll re-jig (revert back) the code to work with clrwin and @