Built the example "cavity2d" error in plbRandom

Hello, everyone.
I’m relative new with palabos. Now i have an problem and cannot get the solution… I run Palabos under windows XP, and compiled it with Code::Blocks.
I tryed to compile the first example cavity2d.h, but when building, a error ocoured in plbRandom.h as followed:

plbRandom.h||In member function ‘virtual void plb::global::DefaultRandom::iterate()’:expressionless:
plbRandom.h|69|error: there are no arguments to ‘random’ that depend on a template parameter, so a declaration of ‘random’ must be available|
plbRandom.h|69|note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)|
plbRandom.h||In member function ‘virtual T plb::global::DefaultRandom::get(plb::pluint)’:expressionless:
plbRandom.h|75|error: there are no arguments to ‘random’ that depend on a template parameter, so a declaration of ‘random’ must be available|
plbRandom.h|77|error: there are no arguments to ‘random’ that depend on a template parameter, so a declaration of ‘random’ must be available|
||=== Build finished: 3 errors, 0 warnings ===|

I hope someone can help.

Songgui

Hi, ive got the same error at the aneurysm-showcase! i dont have a direct solution for the problem, but it seems to be a problem only on the new version 1.2r0. In the previous version 1.1r0 these errors do not appear.
so you should try out these version for practice, till someone solves the problem or gets a solution.

regards, georg

Thank you, geory

I am trying version 1.1r0.

Hope someone can solve it.

regards
songgui

Hello Songgui and Georg,

Here’s a workaround that might do it: Open the file “src/core/plbRandom.h” in a text editor and replace all occurrences of “random()” to “rand()”

Could you please let me know if this fixed the problem? If yes, we will include the fix in the next release.

Best,
Jonas

Hello Jonas

Your solution does fix this problem.

Thank you.

Best~

Songgui

Yes, i agree!
the compiling runs!

Thx, georg