我建立使用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