Calypso: Direct and full interfacing to C++

Kelly via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Apr 23 01:04:45 PDT 2015


On Wednesday, 22 April 2015 at 14:57:43 UTC, Kagamin wrote:
> What about Qt? I don't remember it being heavily templated.


Hello Kagamin,

I haven't tried Qt yet because it needs to be hand-compiled with 
a user supplied namespace, otherwise there isn't a namespace to 
import with Calypso. I have also looked at it a bit and it uses 
some of the STL files that still don't compile with Calypso, like 
<iterator>, etc. so it is probably a no-go at this point.

On a brighter note things are looking extremely close for some 
other libs (and one lib finally works...see below :) ). Here is a 
small sample of some I have tried:

Libzmq should compile with one other change to Calypso. The 
change will need to allow multiple C header files to be 
modulemap'ed. The separate parts of this lib compile on their own 
so once we can use multiple PCH files, this should work.

Fastflow actually DOES compile for all the C++ header files I 
have tried (YAY!!), but I just can't instantiate a worker thread 
(really the most basic need for this lib) because of one error I 
will discuss with Elie. Hopefully it will be pretty easy to fix, 
as the other minor parts of this lib that I have tried are 
working at this point.

Irrlicht has some portions that compile and can be called like 
CWriteFile, CLogger, CImage and some os.h functionality. I ran 
into a couple errors so I stopped testing after that, but it is 
coming along.

Now the best news...it looks like the LEMON C++ Library works!!! 
WooHoo!!

(Library for Efficient Modeling and Optimization in Networks - 
http://lemon.cs.elte.hu/trac/lemon).

I haven't tested everything, but I have imported all the headers 
and compiled them without errors (I think I got them all). I have 
also instantiated things like: dim2.Point, Tolerance, DHeaps, 
Graphs, Digraphs and Arg_Parsers. These all instantiate fine, and 
I have used a few function calls with the instances, so things 
are looking exceptionally good for LEMON. We can also cast 
between Digraphs and Graphs (the C++ classes) in D, so that is 
looking good :)

I will try to do some more complete testing and get at least one 
decent example working to show off this library. I will also 
write up a tutorial on how to get Calypso up and running with 
this lib (Linux only at this point as I haven't even tried the 
Win build from Elie yet...and I don't believe OSX Calypso will 
work yet).

Thanks,
Kelly



More information about the Digitalmars-d-announce mailing list