[MacPorts] #29985: libmpc 0.9 lacks mpc_get_dc
MacPorts
noreply at macports.org
Thu Jun 30 08:47:08 PDT 2011
#29985: libmpc 0.9 lacks mpc_get_dc
--------------------------------------------+-------------------------------
Reporter: russell.jones@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.9.2
Keywords: | Port: libmpc
--------------------------------------------+-------------------------------
The libmpc port is marked as version 0.9, but does not have the mpc_set_dc
function according to nm /opt/local/lib/libmpc.dylib, but the news item at
http://www.multiprecision.org/ says (amongst other things)
"Version 0.9, "Epilobium montanum", released in February 2011, comes with
the following new features:
New functions
mpc_set_dc, mpc_set_ldc, mpc_get_dc, mpc_get_ldc for converting between
mpc type variables and C variables of type double _Complex or long double
_Complex
mpc_sin_cos, computing simultaneously the sine and cosine"
{{{
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <complex.h>
#include "mpc.h"
int main()
{
mpc_t x, y;
mpc_init2 (x, 256);
mpc_init2 (y, 256);
double _Complex z=4.15896+918536*I;
/*Function: int mpc_set_dc (mpc_t rop, double _Complex op,
mpc_rnd_t rnd)*/
mpc_set_dc(x, z, MPC_RNDUU);
/* mpc_set(z, MPC_RNDUU); */
printf("%f+%fi\n",creal(z),cimag(z));
return 0;
}
}}}
gives a missing symbol error when compiled with {{{ gcc-mp-4.5 -o test
main.c -I/opt/local/include -L/opt/local/lib -lmpc -lm }}}
{{{
Undefined symbols:
"_mpc_set_dc", referenced from:
_main in ccfRN56S.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
}}}
--
Ticket URL: <https://trac.macports.org/ticket/29985>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list