Compile test-core in C++

John Ralls jralls at
Tue Nov 18 11:17:42 EST 2014

> On Nov 18, 2014, at 7:10 AM, Chenxiong Qi <qcxhome at> wrote:
> Hi,
> I've converted QofCollection to a C++ class. A side-effect is that I
> have to make src/test-core be able to compile in C++. I'm an absolute
> newbie to autotools, still not get a workable solution so far after
> doing some research on this. Could you give some guide how to
> accomplish this conversion. Conversion only involves the compiler
> changed to a C++ compiler, and the file's extension changed to cpp if
> necessary. Nothing else if src/test-core/* are compiled in C++ without
> errors.
> BTW, besides the conversion to C++ class, I will write unit tests to
> ensure new QofCollection class works as expected.

Great! Thanks! I'm looking forward to your pull request or patch. If you want to go the patch route, please open a bug report.

Why do you want to compile test-core in C++? 

C++ unit tests should use Google Test, aka gtest. The master branch is already set up for it, you just need to enable it in configure and tell configure where the sources are, unless you've got a distro like Debian than installs them in /usr/src, in which case configure can find them on its own.

John Ralls

More information about the gnucash-devel mailing list