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. gmpxx and Creator problem
Forum Updated to NodeBB v4.3 + New Features

gmpxx and Creator problem

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.8k 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.
  • kajzerK Offline
    kajzerK Offline
    kajzer
    wrote on last edited by A Former User
    #1

    I'm on Linux, trying to use gmpxx and Qt, I have no problems using gmpxx outside of Qt.
    in pro file I add :

    LIBS += -lgmpxx
    

    Code is very simple :

    #include <gmpxx.h>
    mpz_class a, b;
    

    Errors :

    :-1: error: mainwindow.o: undefined reference to symbol '__gmp_get_memory_functions'
    /usr/lib64/libgmp.so.10:-1: error: error adding symbols: DSO missing from command line
    :-1: error: collect2: error: ld returned 1 exit status
    

    I'm lost, can anyone help with this ?

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

      Hi
      It cant find the gmpxx lib/so file

      https://stackoverflow.com/questions/24096807/dso-missing-from-command-line

      You need to tell what folder
      http://doc.qt.io/qt-5/third-party-libraries.html

      1 Reply Last reply
      0
      • kajzerK Offline
        kajzerK Offline
        kajzer
        wrote on last edited by
        #3

        It can find it, in the error you can see the path to the libgmp
        Anyway, even when path specified error stays the same.
        I've use 3rd party libs before and had no problems, this one is for some reason special.

        Just solved it, trick is to add -lgmp as well, weird but ok :)

        mrjjM 1 Reply Last reply
        3
        • kajzerK kajzer

          It can find it, in the error you can see the path to the libgmp
          Anyway, even when path specified error stays the same.
          I've use 3rd party libs before and had no problems, this one is for some reason special.

          Just solved it, trick is to add -lgmp as well, weird but ok :)

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @kajzer
          so the so was named (lib)gmp?

          kajzerK 1 Reply Last reply
          0
          • mrjjM mrjj

            @kajzer
            so the so was named (lib)gmp?

            kajzerK Offline
            kajzerK Offline
            kajzer
            wrote on last edited by
            #5

            @mrjj
            there are two so files, libgmp.so and libgmpxx.so
            gmpxx is C++, otherwise gmp is used.

            It was my mistake, been awhile since I've used gmp, I actually had to include both libs when I was linking outside of QT, so it has nothing to do with QT, for some reason I thought that gmpxx is just enough and I completely forgot about adding gmp as well.

            1 Reply Last reply
            3

            • Login

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