开发者

How I compile MPC code?

MPC is here: http://www.multiprecision.org/ I want to compile C++ code with g++ under Linux, with GMP and MPFR both installed. The point is i don't know what flags i should put in开发者_运维百科 command line for compiling.


you need to link with libmpc:

gcc foo.c -o foo -lmpc

I test it with mpc from ubuntu packages:

sudo aptitude install libmpc-dev libmpc2

my foo.c looks like:

#include "mpc.h"

int main() {
    mpc_t x;
    mpc_init2 (x, 256);
    return 0;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜