glassechidna / zxing-cpp

ZXing C++ Library
Apache License 2.0
598 stars 435 forks source link

Manually-specified variables were not used by the project: #43

Open wrapperband opened 8 years ago

wrapperband commented 8 years ago

I am trying to build zxipg to use in out application (Feathercoin). Something has happened in Ubuntu 16.04, where our usual build from source has failed (although we already moved over to Qt5) it seems to an issue with -

   -D_GLIBCXX_USE_CXX11_ABI=0

or =1 , which needs to be set the same for both builds, I get the error message :

Manually-specified variables were not used by the project:

 _GLIBCXX_USE_CXX11_ABI

The method which worked before, copying compiled zxing headers to /src/zxing/ sub directory/

we now get error :

src/qt/snapwidget.cpp:71: undefined reference to `zxing::String::getText[abi:cxx11]() const'

aciddude commented 7 years ago

build zxing-cpp like this:

mkdir zxing && cd zxing 
git clone https://github.com/glassechidna/zxing-cpp.git
cd zxing-cpp/
ls
mkdir build
cd build/
export CXXFLAGS="-fPIC"
cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 -DCMAKE_BUILD_TYPE=Release ..
make && sudo make install