On 06/21/2016 05:30 PM, Neal Becker wrote:
cc -c test_gmp.cpp
cc -o a.out test_gmp.o -lgmp -lgmpxx
/usr/bin/ld: test_gmp.o: undefined reference to symbol
'__gxx_personality_v0@@CXXABI_1.3'
/usr/lib64/libstdc++.so.6: error adding symbols: DSO missing from command
line
collect2: error: ld returned 1 exit status

Here is test_gmp.cpp:
#include <gmpxx.h>
int main() {
  mpz_class a(1);
  return a == 0;
};

You need to link C++ programs with c++ or g++. If you use cc or gcc, you need to figure out the C++ standard libraries and link against them explicitly.

Florian
--
devel mailing list
devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to