where is the lib of "cexp" about GCC?

Discussion in 'C Programming' started by zhangmo2000@163.com, Nov 13, 2007.

  1. Guest

    I had wrote a program and gcc -c XXX.c, the error is undefined
    reference to 'cexp' , I want to link the lib about 'cexp', but I don't
    know where it is.
    , Nov 13, 2007
    #1
    1. Advertising

  2. santosh Guest

    In article <>,
    < > wrote on Tuesday 13 Nov 2007
    1:31 pm:

    > I had wrote a program and gcc -c XXX.c, the error is undefined
    > reference to 'cexp' , I want to link the lib about 'cexp', but I don't
    > know where it is.


    This is an FAQ - <http://www.c-faq.com/>

    Basically you need to include an '-lm' switch with your compilation
    command:

    gcc -c xxx.c -lm

    This tells the linker to link against the system's math libraries which
    are separate from the Standard C library on UNIX systems.
    santosh, Nov 13, 2007
    #2
    1. Advertising

  3. Ian Collins Guest

    wrote:
    > I had wrote a program and gcc -c XXX.c, the error is undefined
    > reference to 'cexp' , I want to link the lib about 'cexp', but I don't
    > know where it is.
    >

    Add -lm.

    --
    Ian Collins.
    Ian Collins, Nov 13, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Yong
    Replies:
    0
    Views:
    533
    James Yong
    Sep 12, 2005
  2. Praetorian

    Need odbc32.lib odbccp32.lib

    Praetorian, Apr 20, 2006, in forum: C++
    Replies:
    1
    Views:
    1,357
    mlimber
    Apr 20, 2006
  3. Durduran
    Replies:
    10
    Views:
    521
    Durduran
    Jul 30, 2007
  4. Replies:
    3
    Views:
    2,731
  5. steve

    cexp implementation questions

    steve, Jan 20, 2011, in forum: C Programming
    Replies:
    10
    Views:
    507
    Ben Bacarisse
    Jan 21, 2011
Loading...

Share This Page