Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Including Cryptopp lib

Including Cryptopp lib

Scheduled Pinned Locked Moved Solved 3rd Party Software
6 Posts 4 Posters 2.3k Views 2 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.
  • D Offline
    D Offline
    dhamith93
    wrote on last edited by
    #1

    I have compiled cryptopp using mingw on windows 10 and added INCLUDEPATH and LIBS paths in the .pro file like this:

    INCLUDEPATH += C:\dev\cryptopp700\
    LIBS += -LC:\dev\cryptopp700\release\ -llibcryptopp
    

    But when I'm trying to build the project I get undefined reference errors. Is there a problem with my INCLUDEPATH and LIBS paths? How should I include the Cryptopp libs into my project?

    I'm only facing this problem in windows. I was able to build my project successfully on macos.

    K aha_1980A 2 Replies Last reply
    0
    • D dhamith93

      I have compiled cryptopp using mingw on windows 10 and added INCLUDEPATH and LIBS paths in the .pro file like this:

      INCLUDEPATH += C:\dev\cryptopp700\
      LIBS += -LC:\dev\cryptopp700\release\ -llibcryptopp
      

      But when I'm trying to build the project I get undefined reference errors. Is there a problem with my INCLUDEPATH and LIBS paths? How should I include the Cryptopp libs into my project?

      I'm only facing this problem in windows. I was able to build my project successfully on macos.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @dhamith93

      Hi and welcome to devnet forum

      Replace the backward slashes with forward slashes, remove last slash and try again.

      INCLUDEPATH += C:/dev/cryptopp700
      LIBS += -LC:/dev/cryptopp700/release -llibcryptopp
      

      Backward slashes are used as end of line for continuation in next line.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      4
      • D Offline
        D Offline
        dhamith93
        wrote on last edited by
        #3

        Thank you! it worked!

        Pablo J. RoginaP 1 Reply Last reply
        1
        • D dhamith93

          Thank you! it worked!

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @dhamith93 please don't forget to mark your post as solved! Thanks.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • D dhamith93

            I have compiled cryptopp using mingw on windows 10 and added INCLUDEPATH and LIBS paths in the .pro file like this:

            INCLUDEPATH += C:\dev\cryptopp700\
            LIBS += -LC:\dev\cryptopp700\release\ -llibcryptopp
            

            But when I'm trying to build the project I get undefined reference errors. Is there a problem with my INCLUDEPATH and LIBS paths? How should I include the Cryptopp libs into my project?

            I'm only facing this problem in windows. I was able to build my project successfully on macos.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @dhamith93

            Just one note: At least on Linux, the prefix "lib" is omitted on giving linker command lines, so it would look like this:

            LIBS += -LC:/dev/cryptopp700/release -lcryptopp

            In my experience it should be the same on MinGW, and would be more portable.

            Regards

            Qt has to stay free or it will die.

            K 1 Reply Last reply
            1
            • aha_1980A aha_1980

              @dhamith93

              Just one note: At least on Linux, the prefix "lib" is omitted on giving linker command lines, so it would look like this:

              LIBS += -LC:/dev/cryptopp700/release -lcryptopp

              In my experience it should be the same on MinGW, and would be more portable.

              Regards

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @aha_1980 @dhamith93

              AFAIK the removal of prefix "lib" is a "feature" of GCC respectively the associated linker which is the basis also for MinGW. On linux it is important to neglect and there it might be better to do on windows as well, when the project shall be used on both platforms.

              However, it has its ups and downs and most of the time there are also other OS dependent settings.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              2

              • Login

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