Calypso: Direct and full interfacing to C++

Kelly via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue May 12 14:44:01 PDT 2015


Well the first fully working example of a large library is 
finally working with Calypso. Elie has managed to get a Qt5 demo 
program to compile and run!!

The demo is a D version of the Qt5 Widgets demo. This is a simple 
window with a pseudo address book app. The demo uses a D class 
inheriting from QWidget, calls 'super(parent)' from D code and 
uses the QStrings, QLabel, QLineEdit, QLayout, QGridLayout 
classes, among other things. You can see the code here: 
https://github.com/Syniurge/Calypso/blob/master/tests/calypso/qt5/qt5demo.d

The demo is confirmed to work with Qt5.4 and Qt5.2.1.

While this might not seem like a really big deal, please keep in 
mind that while compiling this demo, Calypso effectively parses 
and produces 692 object files, including large swathes of the C++ 
STL and most of the Qt library!

The latest push last night also cut down on compile times quite a 
lot. Doing the initial compile of the example takes about 28 
seconds on my mid-level Intel i5 machine, versus around 2 seconds 
for just the C++ version. After generating a cache file with last 
nights commits you can recompile the project in just 7.5 
seconds...which I think is quite good for just getting things up 
and running :)

Thanks,
Kelly


More information about the Digitalmars-d-announce mailing list