Compiler error from calling private constructor

I have a newly installed version of palabos and I am getting an error when I try to compile the cavity2D example (with both g++ and mpicxx). I am using Mac OS Catalina and get the following error:

In file included from cavity2d.cpp:43:
In file included from /Users/cyrus/Documents/Experimentation/palabos/src/palabos2D.hh:46:
In file included from /Users/cyrus/Documents/Experimentation/palabos/src/dataProcessors/headers2D.hh:38:
/Users/cyrus/Documents/Experimentation/palabos/src/dataProcessors/dataAnalysisWrapper2D.hh:2166:12: error: calling a
private constructor of class β€˜std::__1::unique_ptr<plb::MultiScalarField2D,
std::__1::default_delete<plb::MultiScalarField2D > >’
return result;
/Applications/…/include/c++/v1/memory:2536:3: note:
declared private here

I am trying to understand if there is something wrong with xCode or if I need to modify something in the data processor


you probably need to specify that you want to compile for c++ 11. Adding an option like -std=c++11 should do it.

1 Like


Thank you. I added the flag for specifying the c++ standard to the compile flags line in the makefile:

compileFlags = -DPLB_MAC_OS_X -std=c++11

1 Like