switching to C++ compiling by -xc++ (was: gnucash master: Multiple changes pushed)

Mike Alexander mta at umich.edu
Sun Apr 27 22:58:35 EDT 2014

On Apr 27, 2014, at 5:15 PM, John Ralls <jralls at ceridwen.us> wrote:
> However, I don’t think changing files one by one is wise: It will result in libraries with objects compiled with different compilers, and I worry that that will introduce difficult to understand bugs. That’s not a matter for immediate concern, though, as I expect libqof will consume several months before I’ll start on another directory.

I don't think that will be as big a problem as you are afraid it will be.  For 10 years or so I worked on a program about the same size as GnuCash that we gradually converted from C to C++.  Mixing the languages in a library or between libraries didn't seem to be a problem.  We had some new libraries that were entirely C++, some that were a mixture, and some that never got touched and stayed in C.

However, there is one thing I wonder about.  When we first started the conversion one of the first things we had to do was add a new main program written in C++ that did a minimal amount of initialization and then called the old main program (renamed appropriately).  Many C++ features didn't work right without that, although the basic stuff worked ok.  I think we should do the same thing in GnuCash as soon as possible to avoid problems.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4871 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20140427/6d1c3304/attachment.p7s>

More information about the gnucash-devel mailing list