Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion GTK+ and Fortran 2003
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Wolfgang Kilian  
View profile  
 More options Dec 27 2010, 4:37 pm
Newsgroups: comp.lang.fortran
From: Wolfgang Kilian <see...@domain.invalid>
Date: Mon, 27 Dec 2010 22:37:21 +0100
Local: Mon, Dec 27 2010 4:37 pm
Subject: Re: GTK+ and Fortran 2003
On 12/27/2010 03:28 PM, vincenzo wrote:

> 2) Has someone tried to make an interface to Qt library ? (it seems Qt
> is written in C++ and I do not know if the ISO_C_BINDING can be used
> with C++)

Actually, yes.  I wrote a (proof of concept for) a Qt-Fortran interface
some two years ago.  I'd like to continue the project, but didn't so far
due to lack of time.  It's probably not in a state that you can adopt it
without expanding (a lot).

iso_c_binding is sufficient if you write extern "C" interfaces (in C++
code) for all C++ functions that you want to access.  (If you want to
implement all of Qt, that would be quite some work ...) The Qt data
objects are kept opaque and accessed as type(C_PTR).  One of the tricky
parts is to enable Qt's unique signal/slot mechanism.  Qt implements it
by a special preprocessor that generates 'invisible' C++ code before
compilation.  I found a Fortran interface solution that works, but I
also use a preprocessor to keep the user code simple (M4).

I took it as a first exercise in OO programming in Fortran; it's
possible and convenient to mirror the Qt class hierarchy in a
corresponding type hierarchy in Fortran.

-- Wolfgang

> Sincerely yours
> Vincent MAGNIN
> Institut d'Electronique, de Microélectronique et de Nanotechnologie
> France

--
E-mail: firstnameinitial.lastn...@domain.de
Domain: yahoo

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.