Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - compilation error: (6 Items)
   
compilation error  
I have included 'math.h' header file however when I try to compile the source I am getting the following error(I have 
given the proper search path also)

1. undefined reference to `_FLog'
2. undefined reference to `powf'

Any idea why is this happening and how we can resolve this ?
Re: compilation error  
You need to link against the math library. Add -lm to your link line. 

Regards,

Ryan Mansfield

----- Original Message -----
From: Girisha SG [mailto:community-noreply@qnx.com]
Sent: Tuesday, September 28, 2010 08:40 AM
To: general-toolchain <post68736@community.qnx.com>
Subject: compilation error

I have included 'math.h' header file however when I try to compile the source I am getting the following error(I have 
given the proper search path also)

1. undefined reference to `_FLog'
2. undefined reference to `powf'

Any idea why is this happening and how we can resolve this ?




_______________________________________________

General
http://community.qnx.com/sf/go/post68736
Re: compilation error  
Can you tell me the name of the library ?
Re: compilation error  
He just did.

The name is "libm.so". (hence -lm).

On Tue, 2010-09-28 at 09:02 -0400, Girisha SG wrote:
> Can you tell me the name of the library ?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post68744
> 

Re: compilation error  
M.  As I said -lm.. -l is the switch to link against libraries.

Regards,

Ryan Mansfield


----- Original Message -----
From: Girisha SG [mailto:community-noreply@qnx.com]
Sent: Tuesday, September 28, 2010 09:02 AM
To: general-toolchain <post68744@community.qnx.com>
Subject: Re: compilation error

Can you tell me the name of the library ?



_______________________________________________

General
http://community.qnx.com/sf/go/post68744
Re: compilation error  
Done and its working ! thanks a lot