Compilation 在Ubuntu 12.04上编译libdecodeqr 0.9.4

Compilation 在Ubuntu 12.04上编译libdecodeqr 0.9.4,compilation,installation,qr-code,ubuntu-12.04,Compilation,Installation,Qr Code,Ubuntu 12.04,我在Ubuntu10.10和OpenCV 2.2上使用了这个库,效果非常好。比0.9.3版本好得多!现在我正在更新我的系统,我仍然想使用libdecodeqr 0.9.4,但我得到一个编译错误: galois.cpp: In member function ‘Galois::Polynomial* Galois::Polynomial::_lu(Galois::Polynomial)’: galois.cpp:400:48: error: taking address of temporary

我在Ubuntu10.10和OpenCV 2.2上使用了这个库,效果非常好。比0.9.3版本好得多!现在我正在更新我的系统,我仍然想使用libdecodeqr 0.9.4,但我得到一个编译错误:

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
我使用的是Ubuntu 12.04和OpenCV 2.4。我像./configure那样安装了src。我能做些什么来编译这个


谢谢

我想出来了。问题是,新的gcc编译器在错误中而不是警告中“将临时地址转换为临时地址”

使用以下方法构建libdecodeqr,以使其能够编译:

sudo make CXXFLAGS+=-fpermissive
在此之后,显然:

sudo make install
sudo ldconfig