I was using this library on Ubuntu 10.10 with OpenCV 2.2 and it worked really good. Much better than the 0.9.3 version! Now I am updating my system and I still want to use libdecodeqr 0.9.4, but I get a compile error:
galois.cpp: In member function ‘Galois::Polynomial* Galois::Polynomial::_lu(Galois::Polynomial)’:
galois.cpp:400:48: error: taking address of temporary [-fpermissive]
galois.cpp:403:65: error: taking address of temporary [-fpermissive]
galois.cpp: In member function ‘Galois::Polynomial Galois::Polynomial::solve(Galois::Polynomial)’:
galois.cpp:458:69: error: taking address of temporary [-fpermissive]
galois.cpp:464:56: error: taking address of temporary [-fpermissive]
galois.cpp:466:54: error: taking address of temporary [-fpermissive]
galois.cpp: In member function ‘int Galois::BCH::decode(int)’:
galois.cpp:565:56: error: taking address of temporary [-fpermissive]
galois.cpp:567:59: error: taking address of temporary [-fpermissive]
galois.cpp: In member function ‘Galois::Nomial Galois::BCH::_error_syndrome(int)’:
galois.cpp:592:44: error: taking address of temporary [-fpermissive]
make[1]: *** [galois.lo] Error 1
make[1]: Leaving directory `/home/xxx/Downloads/libdecodeqr-0.9.4/libdecodeqr'
make: *** [all-recursive] Error 1
I am on Ubuntu 12.04 and OpenCV 2.4. I did the src install like ./configure make make install. What can I do to make this compile?
Thank you
I figured it out. The problem is that the new gcc compiler “turns taking address of temporary” in an error instead of a warning.
Build libdecodeqr the following way to let it compile:
After that, obviously: