Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Debug build LNK2005 cryptopp
Forum Updated to NodeBB v4.3 + New Features

Debug build LNK2005 cryptopp

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 871 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by MartinD
    #1

    Hi,
    I built Crypto++ 7 library using msvc2013, release dll. I linked it to my msvc2013 Qt app. If my app is built in release mode it runs. When I build it in debug configuration, linker outputs several LNK2005 errors:

    cryptopp.lib(cryptopp.dll):-1: error: LNK2005: "public: static char const * __cdecl CryptoPP::SHA256::StaticAlgorithmName(void)" (?StaticAlgorithmName@SHA256@CryptoPP@@SAPBDXZ) already defined in hwid.obj
    
    cryptopp.lib(cryptopp.dll):-1: error: LNK2005: "public: __thiscall CryptoPP::NotImplemented::NotImplemented(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0NotImplemented@CryptoPP@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in config.obj
    
    cryptopp.lib(cryptopp.dll):-1: error: LNK2005: "public: unsigned int __thiscall CryptoPP::BufferedTransformation::Put(unsigned char const *,unsigned int,bool)" (?Put@BufferedTransformation@CryptoPP@@QAEIPBEI_N@Z) already defined in config.obj
    

    I also trie to build debug cryptopp dll and link it with my app in debug configuration - with the same result.

    What is wrong with my app or cryptopp build?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi,

      What version of SQLite are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MartinD
        wrote on last edited by
        #3

        Why sqlite? I use it, I think it is built in Qt (5.7.1 in my case). Or not?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          Completely unrelated... A usual case of answer on the wrong thread.

          The question was: how did you separate the debug and release builds of that library ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • M Offline
            M Offline
            MartinD
            wrote on last edited by
            #5

            Crypto++ comes with Visual Studio solution files, it is possible to build debug and release versions. But it seems DLL is not recomended for use, one should go with static build. https://www.cryptopp.com/wiki/FIPS_DLL

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved