Páginas

segunda-feira, abril 04, 2016

Change GCC default arguments

I experience this problem with pip, receiving:


    psycopg/adapter_datetime.c:341: error: undefined reference to 'lround'
    psycopg/adapter_datetime.c:336: error: undefined reference to 'lround'
    psycopg/adapter_datetime.c:312: error: undefined reference to 'lround'
    psycopg/adapter_datetime.c:309: error: undefined reference to 'lround'
    psycopg/adapter_datetime.c:381: error: undefined reference to 'floor'
    psycopg/adapter_datetime.c:407: error: undefined reference to 'floor'
    psycopg/adapter_datetime.c:441: error: undefined reference to 'floor'
    ./psycopg/typecast_datetime.c:321: error: undefined reference to 'floor'
    collect2: error: ld returned 1 exit status

To solve this I have to use -lm as argument in GCC. But, I'm using pip! Just export the default cflags:


export CFLAGS='-lm'
 
 
 Try this! 

Nenhum comentário: