Forum Index
Welcome to the Silverfrost forums
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CW_WRITE$ unresolved

Post new topic   Reply to topic Forum Index -> Support
View previous topic :: View next topic  
Author Message

Joined: 08 Dec 2023
Posts: 1

PostPosted: Fri Dec 08, 2023 6:17 pm    Post subject: CW_WRITE$ unresolved Reply with quote


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:

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)
subroutine cw_write$$(unit,info) bind(C,Name='__cw_write')
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!

Back to top
View user's profile Send private message
Site Admin

Joined: 21 Feb 2005
Posts: 7777
Location: Salford, UK

PostPosted: Sat Dec 09, 2023 8:33 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

Jump to:  
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