when trying to compile a case with more than one .cpp file, I got multiple definition errors of type
liggghtsCouplingWrapper.cpp:(.text+0x5c0): multiple definition of `plb::computeCopyReducedBulk(plb::Box3D)'
onetoone.o:onetoone.cpp:(.text+0xa00): first defined here
for the functions
in twoPhaseModel3D.h and
plb::computeCopyEdges(plb::Box3D, std::vector<plb::Box3D, std::allocator<plb::Box3D> >&)
plb::computeCopyCorners(plb::Box3D, std::vector<plb::Box3D, std::allocator<plb::Box3D> >&)
keyword to the implementations of the four functions resovles the issue.
this bug is still present in the newest Palabos release. Please consider fixing this in the next revision/release.
December 22, 2014, 2:54pm
Thanks a lot for reporting this issue, Philippe!
We added the inline keyword as you suggested, and will put this online with the next release.
Hello Jonas, dear all,
a new issue of this type has come up in version 1.5r1 in the file multiPhysics/twoPhaseModel3D.h:
TwoPhaseModel stringToTwoPhaseModel(std::string modelName)
needs to be declared inline to avoid any multiple definition errors. Please correct this in the next release.
February 29, 2016, 5:36am
I have tried with those changes you specified here. But still it shows multiple definition errors. Is it works fine for you ?
for me everything worked - but I can’t tell whether there are other issues like this hidden in other parts of the code. The conditional compilation via scons might hide this as I only use a small subset of the features of Palabos.