Silverfrost Forums

Welcome to our forums

Converting 32 bit to 64 bit

21 Mar 2013 9:41 #11852

Thanks, Paul, I have been going round in circles !

I've included your gFortran compiled MOD files but got the following error message when Build'ing in Simply Fortran :

      USE mswin$                                                        
         1
Fatal Error: Wrong module version '8' (expected '9') for file 'mswin$.mod' opened at (1)

Does this mean you have to compile the MODs in at least an improved version than my gFortran ? [ I am afraid it is not obvious during the compilation what version of gFortran I have ]

Thanks

21 Mar 2013 3:29 #11858

I does look like you are using a later version of gFortran. Are you using the 64 bit gFortran compiler? If you are then I will try to use the later gFortran for my next upload.

21 Mar 2013 3:41 #11859

Yes, I am having to use the 64 bit compiler.

Will this be a problem whenever gFortran changes versions ?

Will the next CLEARWIN64.EXE, then, include the updated MODs and the 'new' bit testing/setting routines etc ?

editted 16:02 :-

In the meantime I have attempted to create a Simply Fortran project using the Clrwin.f95 source from the download. [ thereafter I was going to create an individual MOD for each of the other source files ]. This generated loads of errors that went something like :

Open Watcom Make Version 1.9 (Built on Feb  4 2013)
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
	'C:\\Program Files (x86)\\Simply Fortran\\mingw-w64\\bin\\gfortran.exe' -c -o 'build\\clrwin.o' -g  -fdollar-ok -fno-range-check -fno-align-commons -fno-underscoring -Jmodules '..\\..\\Program Files (x86)\\Silverfrost - 6.3.1 - beta gFortran\\FTN95\\source64\\clrwin.f95'
	'C:\\Program Files (x86)\\Simply Fortran\\mingw-w64\\bin\\gfortran.exe' -o 'ClearwinMod.dll' -shared 'build\\clrwin.o' -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ -mrtd -static
build\\clrwin.o: In function `__clrwin$_MOD_get_files$':
C:\\SimplyFortran\\ClearwinMod/../../Program Files (x86)/Silverfrost - 6.3.1 - beta gFortran/FTN95/source64/clrwin.f95:3795: undefined reference to `__close_get_next'
C:\\SimplyFortran\\ClearwinMod/../../Program Files (x86)/Silverfrost - 6.3.1 - beta gFortran/FTN95/source64/clrwin.f95:3801: undefined reference to `__close_get_next'
C:\\SimplyFortran\\ClearwinMod/../../Program Files (x86)/Silverfrost - 6.3.1 - beta gFortran/FTN95/source64/clrwin.f95:3802: undefined reference to `__get_errno'

If I had to create my own modules from your source what other data files would I need to include with the Clrwin.f95 ?

Thanks

21 Mar 2013 11:13 #11861

Paul,

While I have not been involved in the Clearwin_64 discussion, I am interested to persue this when I have the time available to dedicate to this. Is gFortran the only 64_bit compiler supported ?

My preference is with Intel, which supports faster run times, especially with SSE2 and AVX instructions available. I am using this for coding technique development.

I should point out that most (all) of the code I am using for paid work is running using FTN95. It runs slower but is (hopefully) bug free, thanks to the diagnostics available in FTN95.

John

22 Mar 2013 6:28 #11862

To date 64 bit ClearWin+ has been tested with gFortran and NagFortran but it is designed to work with any Standard conforming Fortran. In particular the bindings that are provided use ISO_C_BINDING whilst the DLL is written in C++.

23 Mar 2013 8:55 #11870

I forgot to mention that the Fortran compiler must use the common convention of passing hidden string length arguments at the end of the argument list.

24 Oct 2015 1:25 #16952

I suspect I a bit out of my depth here, but I'm trying to link to the ClearWin+ DLL from NAGWare. I worked out that I had to compile the Fortran programs that are distributed in Silverfrost\FTN95\source64\ but soon got stuck with a compiler message complaining about inconsistent calls to some of the functions. For example, the following program generates a complaint about the second argument changing from integer to character, while similar complaints can be generated if the number of arguments changes:

PROGRAM p
USE clrwin$
  INTEGER :: iw
  iw=winio$('%bg&',1)
  iw=winio$('%ca@','Title')
END PROGRAM p

Can anybody suggest what I need to do to get the syntax of such functions recognised?

Also what should I do with the WINAPP statement?

24 Oct 2015 7:45 #16953

If the 'complaining' is a warning then you can just ignore it. Otherwise you will need to find a way to get the compiler to ignore the 'error'.

You will have to leave out WINAPP. You can manage without it but to avoid seeing a DOS box on startup you will need to find out how to get the linker to mark the executable as a Windows executable rather than a Console executable.

Please login to reply.