BACKGROUND
I have written a large, complex application using GFortran, and using Dislin both for the GUI and for program graphics.
I am attempting to create executables under both Windows and Linux. The exact same source file compiles, links, loads and runs without error, in both:
- Micro$oft Windows 7.
- Linux Mint.
I use Approximatrix Simply Fortran as my WIndows IDE and CodeBlocks-Fortran as my Linux IDE. Both of the IDEs use GFortran - the Windows and Linux versions of GFortran, obviously.
In my project, I have split the screen into three 'panes':
LEFT-UPPER pane is a vertical scrolling text output pane.
RIGHT-UPPER pane displays 'HELP' text and output graphics.
ACROSS-BOTTOM pane is where the GUI displays user-editable input data.
The only change I have had to make when porting from Windows to Linux is to load what I am assuming is the correct version of DISLIN. The laptop on which I've created a Linux version of my project is an old HP 1GB 'Compaq nc4400' with Intel Core 2 CPU T7200 @ 2.0GHz x 2, and the operating system is Linux Mint rev.16 'Cinnamon', 32-bit. (which, by the way, is a BRILLIANT way of bringing back to life LIKE NEW any old laptop that was thrown away years ago because it could not cope with the latest versions of Windows).
I have used this Dislin install file:
dislin-10.4.linux.i586.deb
To emit the initial 'HELP' text, the program uses a sequence of calls like these:
LH = 43
CALL HEIGHT(LH)
CALL MESSAG
+('The program uses the stiffness method to solve bending '//
+ 'moments, axial and shear forces at member ends of linear',LX,LY)
LY = LY+LS+LH
CALL MESSAG
+('elastic rigid-jointed skeletal framed structures. The highly '//
+ 'efficient ''skyline'' storage method is used to compact the',
+ LX,LY)
LY = LY+LS+LH
CALL MESSAG
+('stiffness matrix, enabling very large problems to be solved '//
+ 'entirely in memory. Numbers of nodes, members, material',
+ LX,LY)
LY = LY+LS+LH
CALL MESSAG
+('types, member types, springs and loads are limited only by '//
+ 'the available memory and disk storage capacity.',LX,LY)
To send graphics to the RIGHT UPPER Widget screen pane, I have used
CALL setxid(idDRW,'WIDGET')
CALL metafl('CONS') !Graphic page goes to screen
...followed by a lot of calls like this:
CALL LINWID(NINT(Thickness))
CALL COLOR('GRAY')
CALL RLINE(x1,y1,x2,y2) ! Within the CALL GRAF range
My problem
WINDOWS VERSION
When I run the compiled executable under Windows, the screen looks,
as intended, like screenshot Win01.
It has some 'HELP' text displayed in the RIGHT-UPPER pane.
Then, after pulling down a file-opening menu in my application and opening a data file, the screen looks as intended,
like screenshot Win02.
The LEFT UPPER pane displays the input data.
The RIGHT-UPPER pane displays an image of a structural frame.
LINUX VERSION
When I run the compiled executable under Linux, the screen looks,
not as intended, like screenshot Lin01-Startup1.
The intended 'HELP' text is displayed, but it is not in the UPPER RIGHT pane as intended.
It fills the whole program window. After I click the RMB, the display changes to Lin01-Startup2.
When I then open a file, the display changes to look like Screenshot Lin02.
If I pull down a program menu and select a program function to change the display slightly, I can make it show Lin03.
HELP REQUEST
I am using the exact same code in both the Windows and Linux versions, and both use Dislin. It is excellent that the same code compiles first time when ported to Linux but I was therefore also expecting Lin01 and Lin02 to look the same as Win01 and Win02, respectively. I would very greatly appreciate any help anyone can offer me about what I might be doing wrong here, because my Linux output is not at all right.
---
John Wasilewski