Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > where is the lib of "cexp" about GCC?

Reply
Thread Tools

where is the lib of "cexp" about GCC?

 
 
zhangmo2000@163.com
Guest
Posts: n/a
 
      11-13-2007
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.

 
Reply With Quote
 
 
 
 
santosh
Guest
Posts: n/a
 
      11-13-2007
In article <(E-Mail Removed) .com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) < (E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      11-13-2007
(E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lib depending on Lib, packaging for distro Christopher C++ 4 11-01-2007 10:36 PM
difference between libboost_regex-mt-gd-1_33_1.lib and boost_regex-mt-gd-1_33_1.lib ideal.black@gmail.com C++ 3 09-30-2007 06:54 AM
how to debug this error? /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o Durduran C Programming 10 07-30-2007 09:03 PM
Need odbc32.lib odbccp32.lib Praetorian C++ 1 04-20-2006 07:14 PM
Diff betw common/lib and shared/lib in Tomcat James Yong Java 0 09-12-2005 02:36 AM



Advertisments