Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28703 Discussions

language choice for programming a user interface on multiple OS platforms, to run Fortran DLLs

Greg_T_
Valued Contributor I
470 Views
Hello,

I am seeking advice about the programming language to use to develop software for several operating system (OS)platforms. We have engineering software that currently uses an older version of Visual Basic (VB)to create the graphical user interface (GUI), which then calls several Intel Fortran DLLs, but this will run only on Windows. We would like to improve the software so that it could run on several different operating systems such as Linux as well as Windows 64-bit.

The GUI has many input forms with pull-down menus, radio buttons, check boxes,text boxes, data sheets, etc. to enter the model data and select options. The results are shown as a picture of the structure (currently using OpenGL for the graphics to render the 3D picture), and several x-y plots. Some items like the data sheets and x-y plots are provided by 3rd party software libraries that link into the Visual Basic.

Ideally, it would be most convenient to use just one language for the GUI that could be compiled and run on both Linux and Windows, rather than programming a GUI for each OS separately using different languages. Would the IntelC++ or C# compilers support this? I'm pretty sure that our Fortran code could be compiled for both Linux and Windows.

Your advice on creating a multi-language software (Fortran plus another language for the GUI) for various OS choices is greatly appreciated. Also your advice on possible difficulties would be helpful. Let me know if I can provide more details if that would help. Let me know if one of the other forums would be more appropriate for this questions.

Thank you for your help.
Regards,
Greg
0 Kudos
6 Replies
eos_pengwern
Beginner
470 Views
Have you considered Java? As far as I know this is the only platform-independent GUI language, since C++ is dependent on accessing the operating system API to create a GUI, and C# depends on .NET which is only available on Windows (though there is an open-source platform, called MONO, that emulates it to an extent on Linux platforms).

I don't have first-hand experience, but I understand that calling DLLs from Java isn't trivial but can be done (I've come across something called J/Invoke which claims to ease the process).

Another option is Matlab; this is available for Windows, Mac and Linux, but it is quite expensive (especially if you buy the compiler rather than just the interpreter). The GUI functions are in any case derived from Java, and it is possible to integrate Javacode into Matlab GUIs (though not, alas, to do the reverse).
0 Kudos
joseph-krahn
New Contributor I
470 Views
A good choice for a cross-platform UI is wxWindows. It uses native GUI libraries, so it fits the design/style of the native OS, and has bindings to more than one programming language.

I like FLTK; it has built-in support for OpenGL sub-windows. The goal of FLTK is to keep things simple and light-weight. The UI is all internally rendered, so it looks the same on all OSes (i.e. no top-of-screen menu on Mac OS).

0 Kudos
ArturGuzik
Valued Contributor I
470 Views
I like FLTK; it has built-in support for OpenGL sub-windows. The goal of FLTK is to keep things simple and light-weight. The UI is all internally rendered, so it looks the same on all OSes (i.e. no top-of-screen menu on Mac OS).

(1) FLTK is free licensed under LGPL with some additional clauses.
(2) Java -- calling Fortran is not that difficult, especially if you use C++ as a middle layer. I recall that there was somewhere an excellent article by Lorri Menard on the topic.

(3) If you want a supported product/library (what is usually a case for development of commercial application) another choice would be to use Qt software.

A.
0 Kudos
Steven_L_Intel1
Employee
470 Views
Quoting - ArturGuzik

(2) Java -- calling Fortran is not that difficult, especially if you use C++ as a middle layer. I recall that there was somewhere an excellent article by Lorri Menard on the topic.


Here is Lorri's article.
0 Kudos
eos_pengwern
Beginner
470 Views
Quoting - ArturGuzik

(1) FLTK is free licensed under LGPL with some additional clauses.
(2) Java -- calling Fortran is not that difficult, especially if you use C++ as a middle layer. I recall that there was somewhere an excellent article by Lorri Menard on the topic.

(3) If you want a supported product/library (what is usually a case for development of commercial application) another choice would be to use Qt software.

A.

Qt looks like it is just what I've been looking for myself; something cross-platform which is faster than Java and much cheaper than Matlab. Thanks for the tip.

Stephen.
0 Kudos
Greg_T_
Valued Contributor I
470 Views
Hello,

Thank you for the multiple replies with advice and links. This gives us several good starting points to decide how to proceed with the GUI development.

Regards,
Greg

0 Kudos
Reply