我建立使用MinGW的斑马线声明,但它失败,这些错误:错误:“srandom”没有在此范围
build\core\tests\src\common\BitArrayTest.cpp: In static member function 'static void zxing::BitArrayTest::fillRandom(zxing::BitArray&, zxing::BitArray&)':
build\core\tests\src\common\BitArrayTest.cpp:99:39: error: 'srandom' was not declared in this scope
build\core\tests\src\common\BitArrayTest.cpp:101:15: error: 'random' was not declared in this scope
scons: *** [build\core\tests\src\common\BitArrayTest.o] Error 1
我尝试添加-DANN_NO_RANDOM
到编译器标志,但事实并非如此帮帮我。
你的意思是['rand'](http://www.cplusplus.com/reference/clibrary/cstdlib/rand/)和['srand'](http://www.cplusplus.com/reference/) clibrary/cstdlib /函数srand /)? – jrok
不,zxing的代码真的使用[srandom和random](http://linux.about.com/library/cmd/blcmdl3_srandom.htm)。 – sashoalm