I am not getting very far am I ?
I am now going to start with a single .f95 which will create a .MOD and build a .dll
The top few lines of this enormous file are as follows :
module clrwin
use ISO_C_BINDING
integer,parameter::CW_HANDLE=C_LONG_LONG
type edit_info
sequence
integer(C_INT) ::h_position !Cursor horizontal character position
integer(C_INT) ::v_position !Cursor vertical character position
integer(C_INT) ::last_line !Total no of lines in the buffer
integer(CW_HANDLE) ::buffer !Buffer
integer(C_INT) ::buffer_size !Size of buffer contents (excluding nul terminator)
integer(C_INT) ::max_buffer_size !Size of memory block
integer(CW_HANDLE) ::current_position !Buffer position corresponding to h_position/v_position
integer(CW_HANDLE) ::selection !Points to selected text if any
integer(C_INT) ::n_selected !No of selected characters
integer(C_INT) ::vk_key !Set to VK... if this handles a key press
integer(C_INT) ::vk_shift !Shift state corresponding to key
integer(C_INT) ::active !Set when call-back invoked, reset afterwards
integer(C_INT) ::modified !Set to 1 each time the buffer is modified
integer(C_INT) ::closing !Set when buffer is about to be closed
integer(C_INT) ::n_chars_to_colour !Set if this is a call to supply text colours
integer(CW_HANDLE) ::text_to_colour !Pointer into buffer for region to colour
integer(CW_HANDLE) ::text_colours !Forground colours
integer(CW_HANDLE) ::background_colours !Background colours
integer(C_INT) ::modification_count
integer(C_INT) ::modification_flag !Reserved
integer(C_SHORT) ::reserved !For future enhancements
end type
integer,parameter::Y_PERMANENTLY = 0
integer,parameter::Y_TEMPORARILY = 1
integer,parameter::Y_NEVER = 2
integer,parameter::CURSOR_ARROW = 32512
integer,parameter::CURSOR_IBEAM = 32513
integer,parameter::CURSOR_WAIT = 32514
integer,parameter::CURSOR_CROSS = 32515
integer,parameter::CURSOR_UPARROW = 32516
integer,parameter::CURSOR_SIZE = 32640
integer,parameter::CURSOR_ICON = 32641
integer,parameter::CURSOR_SIZENWSE= 32642
integer,parameter::CURSOR_SIZENESW= 32643
integer,parameter::CURSOR_SIZEWE = 32644
integer,parameter::CURSOR_SIZENS = 32645
integer,external::winio@
external window_update@
!-------------------------------------------
abstract interface
function clrwin_cb@() bind(C)
use,intrinsic::ISO_C_BINDING
integer(C_INT)::clrwin_cb@
end function clrwin_cb@
end interface
!!General functions....
!-------------------------------------------
interface
function windows_instance@() bind(C,Name='__windows_instance')
use ISO_C_BINDING
integer(C_LONG_LONG)::windows_instance@
end function windows_instance@
end interface
!-------------------------------------------
When attempting to compile, SF generates the following :
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 -m32 -fdollar-ok -fno-range-check -fno-underscoring -Jmodules "..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95"
..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95:44.25:
integer,external::winio@
1
Error: Syntax error in data declaration at (1)
..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95:45.24:
external window_update@
1
Error: Unexpected character in variable list at (1)
..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95:49.18:
function clrwin_cb@() bind(C)
1
Error: Expected formal argument list in function definition at (1)
..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95:50.29:
use,intrinsic::ISO_C_BINDING
1
Error: Unexpected USE statement in INTERFACE block at (1)
..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95:51.26:
integer(C_INT)::clrwin_cb@
1
Error: Syntax error in data declaration at (1)
..\..\Program Files\Silverfrost - amended for gFortran\FTN95\source64\clrwin.f95:52.4:
end function clrwin_cb@
1
Error: Expecting END INTERFACE statement at (1)
I cannot find a Users Guide of gnu gFortran in the SF Help. So I wonder if you could explain the compiler errors.
Thanks