bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem of use of gmp in hp-ux 11.11: Please HELP


From: rachid_mesbahi
Subject: Problem of use of gmp in hp-ux 11.11: Please HELP
Date: Mon, 20 Mar 2006 12:14:16 +0100


Hello
I want to use "gmp".
I downloaded from "http://hpux.cs.utah.edu/hppd/hpux/Maths/Misc/gmp-4.1.4/" the library gmp.
I want to use it in opencobol.
I tested it in small program.
I meet problem when i use it. I have the error code " Mismatched ABI. 64-bit PA shared library found in 32-bit link".
Can you help  me ?

Thank you.

more test.c
#include <stdio.h>
#include "/usr/local/include/gmp.h"         /* All GMP programs need to include gmp.h */

    main (int argc, char **argv)
    {
      mpz_t a, b, p;

      if (argc != 3)
        {
          printf ("Usage: %s <number> <number>\n", argv[0]);
          return 1;
        }

      /* Initialize variables */
      mpz_init (a);
      mpz_init (b);
      mpz_init (p);

      /* Assign a and b from base 10 strings in argv */
      mpz_set_str (a, argv[1], 10);
      mpz_set_str (b, argv[2], 10);

      /* Multiply a and b and put the result in p */
      mpz_mul (p, a, b);

      /* Print p in decimal */
      gmp_printf ("%Zd\n", p);

      /* Clear out variables */
      mpz_clear (a);
      mpz_clear (b);
      mpz_clear (p);
      return 0;
    }


test.c:
So i made :
gcc test.c -lgmp -o test.exe
/usr/ccs/bin/ld: /usr/local/lib/libgmp.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.
collect2: ld a retourné 1 code d'état d'exécution

I use "gcc" and "gmake"
gcc -v
Utilisation des specs internes.
Target: hppa2.0w-hp-hpux11.11
Configuré avec: ../gcc/configure
Modèle de thread: single
version gcc 4.1.0
 
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gmake check >test-check.txt


uname -a
HP-UX srvdev B.11.11 U 9000/800
Rachid MESBAHI
Mutualité Française

Attachment: test-check.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]