compilation error in mac: undefined symbols plb::defaultGenerateMultiScalarField2D<int>(

Hello, I’m compiling the different examples in the palabos library. In some cases I can not compile because the follwing error:

Undefined symbols for architecture x86_64:
“plb::ParallelScalarAccess2D::ParallelScalarAccess2D()”, referenced from:
std::auto_ptr<plb::MultiScalarField2D > plb::defaultGenerateMultiScalarField2D(plb::MultiBlockManagement2D const&, long) in aneurysm_bounceback.o

This was obtained for examples/showCases/aneurusm, but I had this result in other 3d examples.
I’m using palabos-v1.1r0, compile with openmpicxx, and use the -DPLB_MAC_OS_X flag.
Surprisingly there are other 3d flows that compiles without problem. I suspect that it has to do with image writing, but I’m still very novice with this fantastic library.
Thanks in advance, best regards,
Diego Peinado


Thanks for your bug report.

Let’s try the following: In the end-user programm, right after

#include “palabos3D.h”
#include “palabos3D.hh”

also add the headers for the 2D code:

#include "palabos2D.h"
#include "palabos2D.hh"

Does this solve your problem? Please let us know, as this would give us a hint to fix this compilation issue in a permanent way.


Yes, it solves the problem, thanks a lot.
By the way, with palabos-v1.2r0, in the aneurysm example new errors appears.

7 errors of type -> error: redefinition of default argument
1 error of type -> error: call to function ‘isnan’ that is neither visible in the template definition nor found by
argument-dependent lookup
Thanks for your help, best regards