title: Using Crypto++ static library in a QT project
body: <blockquote>
    <p>I have built cryptopp statically on my system it passes all tests too. These are the warning though I get during tests</p>
  </blockquote>
  
  <pre><code>WARNING: CRYPTOPP_NO_UNALIGNED_DATA_ACCESS is not defined in config.h.
  WARNING: CRYPTOPP_INIT_PRIORITY is not defined in config.h.
  WARNING: CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 is defined in config.h.
  WARNING: You should make these changes in config.h, and not CXXFLAGS.
  WARNING: You can 'mv config.recommend config.h', but it breaks versioning.
  WARNING: See http://cryptopp.com/wiki/config.h for more details.
  </code></pre>
  
  <p>I now link this in my QT project file as </p>
  
  <pre><code>TEMPLATE = app
  
  LIBS += -L/usr/lib/libcryptopp.a
  #LIBS += -lcryptopp
  
  CONFIG += console c++11
  CONFIG += staticlib
  
  SOURCES += main.cpp \
  hashdata.cpp
  
  HEADERS += \
  hashdata.hpp
  </code></pre>
  
  <p>But when I compile this I get all undefined errors.</p>
  
  <pre><code>hashdata.o: In function `hashdata::hashfunction(std::string)':
  hashdata.cpp:(.text+0x1fb): undefined reference to `CryptoPP::Algorithm::Algorithm(bool)'
  hashdata.cpp:(.text+0x270): undefined reference to `CryptoPP::SHA512::InitState(unsigned long long*)'
  hashdata.cpp:(.text+0x29a): undefined reference to `CryptoPP::Algorithm::Algorithm(bool)'
  hashdata.cpp:(.text+0x2a1): undefined reference to `vtable for CryptoPP::StringSinkTemplate&lt;std::string&gt;'
  hashdata.cpp:(.text+0x30b): undefined reference to `CryptoPP::Filter::Filter(CryptoPP::BufferedTransformation*)'
  hashdata.cpp:(.text+0x312): undefined reference to `vtable for CryptoPP::Grouper'
  hashdata.cpp:(.text+0x35e): undefined reference to `CryptoPP::Filter::Detach(CryptoPP::BufferedTransformation*)'
  hashdata.cpp:(.text+0x375): undefined reference to `CryptoPP::Filter::Filter(CryptoPP::BufferedTransformation*)'
  hashdata.cpp:(.text+0x37c): undefined reference to `vtable for CryptoPP::BaseN_Encoder'
  hashdata.cpp:(.text+0x3d3): undefined reference to `CryptoPP::Filter::Detach(CryptoPP::BufferedTransformation*)'
  hashdata.cpp:(.text+0x3e5): undefined reference to `CryptoPP::ProxyFilter::ProxyFilter(CryptoPP::BufferedTransformation*, unsigned long, unsigned long, CryptoPP::BufferedTransformation*)'
  hashdata.cpp:(.text+0x3ec): undefined reference to `vtable for CryptoPP::HexEncoder'
  hashdata.cpp:(.text+0x452): undefined reference to `vtable for CryptoPP::AlgorithmParametersTemplate&lt;int&gt;'
  hashdata.cpp:(.text+0x4af): undefined reference to `vtable for CryptoPP::AlgorithmParametersTemplate&lt;CryptoPP::ConstByteArrayParameter&gt;'
  ...
  </code></pre>
  
  <p>I have seen a similar problem previously when I searched in google, but the solution isn't clear. Could it be because of C++11 flags ? </p>