Garry,
Thank you very much for your valuable information. I searched about
Tcl/Tk and seems that can generate GUI for my Fortran code. However:
1- it is an interpreter and the user should know the knowledge of
compiling Fortran code and use it with Tk. i want to generate some
small softwares and ask the students to work on them and they can not
do it. so i prefer something that can results in a binary executable
package.
2- i want to access the GUI objects anywhere in the code. not only for
creating a menu to get initial data, but also for communicating with
user for probable problems during the computation. So, any Fortran
subroutines should be able to access the GUI object. I am not sure
about the main part. It can be in Fortran, C or Tk. this scheme is the
second way in your suggestions. i do not know if my fortran compiler
(intel) and Tk are compatible to do this.
Regards,
Hadian
=================================================
Mohammad Reza Hadian, Assis. Prof.
Dept. of Civil Eng., Faculty of Engineering
Yazd University
Taleghani Ave., Yazd, Iran
P.O.Box: 89195-741
Tel.: +98(351)8211671~79 (Ext.2470)
Fax : +98(351)8210699
Email: [log in to unmask]
Personal Email: [log in to unmask]
Homepage: www.hadian.info
=================================================
Garry Willgoose wrote:
> Hadian,
>
> This is a major problem for modern fortran development. I have also
> had problems. You are right about GTK. I looked carefully at QT and
> came to the conclusions that the object orientation of it made it too
> difficult to integrate with fortran.
>
> I have recently had some success with Tcl/Tk which is available for
> all platforms and appears quite mature. Its also open source with what
> appears to be a large and active user community (Tcl/tk also appears
> to be the standard GUI used for some of the computer scientist's
> current languages ... Ruby, Python, etc ... suggesting a continuing
> interest in support/development of Tcl/Tk). Its an interpretted
> language that is installed as standard on LINUX and Mac OSX, and its
> easy to install in Windows. It can be used two ways.
>
> 1. You can write your interface in Tcl/Tk and then call either (a)
> stand alone fortran executables (this is really dead easy ... I had a
> reasonable complexity interface calling standalone programs up and
> running from not knowing any Tcl/Tk in a couple of weeks) or (b) call
> at run time fortran subroutines (a little less easy and your
> subroutines have to be in shared libraries or DLLs ... a problem if
> for some reason you need to do a static link for your code). There is
> a standard interpretter (called wish) that you run and that runs the
> Tcl/Tk code and calls the fortran, etc.
>
> 2. You can include the Tcl/Tk as subroutine calls within you fortran
> code (Tcl/tk is written in C so you will need a C compiler on the
> platform you are developing for ... this is really only an issue for
> Windows). I have not had any experience with this since I've been
> happy with doing 1. above.
>
> You have access to all the standard GUI elements you would normally
> want (menus, dialogs, embedded text editors, simple graphics canvas,
> etc), a "standardised" fortran interface (ftcl) and there are a ton of
> optional extras that I have only browsed (e.g. opengl, mysql
> interface, Tcp/ip support, http).
>
> The source code can can be got at www.sourceforge.net and there are
> free binary installs at www. activestate.com (who also sell all sorts
> of add on development tools). If you are on LINUX you will likely have
> Tcl/Tk installed already. To check execute
>
> wish
>
> and at the prompt type
>
> info patchlevel
>
> This will give the current revision you have installed ... typically
> something after 8.4.7 ... the latest version is 8.4.13 but I have not
> noticed any differences between the versions except on Mac OSX. If
> wish doesn't exist then Tk is not installed. IN that case try
>
> tclsh
>
> and again do
>
> info patchlevel
>
> If this works the you just have Tcl installed. Normally they go
> together (Tk is written in Tcl) but I had one LINUX install where only
> Tcl was installed for some reason. Tcl by itself is not much use
> because the GUI stuff is in Tk.
>
> Garry Willgoose
>
>
>
>> Hi
>> I generated my CFD code in Fortran 90 and can compile it using any
>> Fortran 90 compiler on both windows and Linux. Now I want to make a
>> GUI for my code. On windows I can use Intel Visual Fortran compiler,
>> but I want a multi platform one.
>> The only think that I found is the “pilib” library which is a port of
>> GTK for Fortran, but it is still under development and is not a
>> complete one.
>> What is your suggestion for visual Fortran 90 programming especially
>> on Linux? (I prefer a free one!!!)
>> are there any free tools to use in Fortran?
>> Is it advised to use C++/Fortran90 mixed programming and applying
>> wxWidget or QT libraries? In this case, is it more straightforward
>> for the main program to be in C++ or Fortran90? I doubt if I can
>> integrate my Fortran90 code with wxWidget library and call its
>> functions in my code. Especially the compiler and linker that can
>> compile and link both of them is a question for me.
>> Best Regards,
>> Hadian
>
> ====================================================================
> Prof Garry Willgoose,
> Australian Professorial Fellow in Environmental Engineering,
> School of Engineering, The University of Newcastle,
> Callaghan, 2308
> Australia.
>
> Phone: (International) +61 2 4921 6050 (Tues-Thurs); +61 2 6545 9574
> (Fri-Mon)
> FAX: (International) +61 2 4921 6991 (Uni); +61 2 6545 9574 (personal)
> Env. Engg. Secretary: (International) +61 2 4921 6058
> WWW : www.telluricresearch.com
>
> work email: [log in to unmask]
> personal email: [log in to unmask]
> personal-email-for-life: [log in to unmask]
> ====================================================================
> "Do not go where the path may lead, go instead where there is no path
> and leave a trail"
> Ralph Waldo Emerson
> ====================================================================
>
|