bug-gmp
[Top][All Lists]
Advanced

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

mpz_import fails.


From: W.R. Dittmer
Subject: mpz_import fails.
Date: Tue, 2 Jul 2002 14:56:10 +0200 (CEST)

Hi

I wrote a small test program that imports a mpz from a char * string,
when I run it gives the following error: 
./small: relocation error: ./small: undefined symbol: __gmpz_import

Hope you can figure out what's wrong.

Greetz, 

        Wilfred R. Dittmer


Here is the information of my machine, version and the test program that
fails:

GMP version: 4.1

Test program: 
-------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <gmp.h>

int main(int argc, char **argv) {

    char *string = "just some data";
    mpz_t test;

    mpz_init(test);
    mpz_import(test, strlen(string), 1, sizeof(char), 0, 0, string);

    return 0;
}
-------------------------------------------------------------------------------

Compile with: gcc small.c -o small -lgmp
Compiler gives NO errors.

Running it gives the following error: 
./small: relocation error: ./small: undefined symbol: __gmpz_import

Gcc version: gcc version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)
uname -a: Linux wilfred.cs.vu.nl 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 2002 
i686 unknown
./config.guess: athlon-pc-linux-gnu
./configfsf.guess: i686-pc-linux-gnu





reply via email to

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