 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
MJW4498
Joined: 08 Dec 2023 Posts: 1
|
Posted: Fri Dec 08, 2023 6:17 pm Post subject: CW_WRITE$ unresolved |
|
|
Hello!
I'm having an issue where I'm not picking up the subroutine CW_WRITE$ in clearwin64. I'm working with the latest v9.00, however a colleague of mine is not having this issue and they are working in v8.80.
When I compile my program, I can see from the .map file that is is not picking up CW_WRITE:
---
CW_WRITE$ *Unresolved* -
---
I can see it is picking up some items from clearwin64.dll though (this is where it is picked up from for my colleague in v8.80), for example we have the following in the .map file:
---
COMMAND_LINE - CLEARWIN64.DLL
---
So the question is, is CW_WRITE$ actually in CLEARWIN64.dll?
I've noted that I can find the CW_WRITE$ subroutine within the program folder (C:\Program Files (x86)\Silverfrost\FTN95\source64) in clrwin.f95:
---
!! %cw functions...
subroutine cw_write$(unit,info)
integer(C_INT)::unit
character(len=*)::info
interface
subroutine cw_write$$(unit,info) bind(C,Name='__cw_write')
use ISO_C_BINDING
integer(C_INT),value::unit
character(kind=C_CHAR)::info(*)
end subroutine cw_write$$
end interface
call cw_write$$(unit,trim(info)//C_NULL_CHAR)
end subroutine cw_write$
---
This is then included in clearwin64f.f95. So I presume it makes its way into clearwin64f.dll, but does it get into clearwin64.dll?
Can anyone shed some light on this for me?
Thanks in advance!
[/u] |
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7777 Location: Salford, UK
|
Posted: Sat Dec 09, 2023 8:33 am Post subject: |
|
|
CW_WRITE$ is a routine that is used to output text to a ClearWin+ window that uses the %cw format code. It is provided for use with third party compilers such as gFortran.
When compiling with the native FTN95 compiler, CW_WRITE@ (or CW_WRITE$) is not needed because text can then be written to a %cw control using Standard conforming WRITE or PRINT statements.
CW_WRITE$ is exported from ClearWin64.dll as __cw_write so it needs an interface in order to access it from a Fortran program. For FTN95 users the interface is provided, for example, via USE clrwin.
The equivalent for gFortran users is USE clrwin$ but current usage requires that the user imports clrwin.f95 into their project. Alternatively you can extract the code that you have found and include the interface in your code. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|