LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-14-2004, 11:13 AM   #1
shyam_d_sundar
Member
 
Registered: Mar 2004
Posts: 43

Rep: Reputation: 15
including files with Kdevelop


Hi,
I have recently installed Mandrake 10.0.
I am trying to compile my code using Kdevelop. It compiles for asimple "HEllo WOrld" code. But, when I include math.h and use a function (sqrt, pow), it compiles, but says undefined reference when tried to link it. I think it should be a simple switch - like including the library.

Someone please help me with this.

Regards,
Shyam Sundar
 
Old 03-14-2004, 02:54 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,575

Rep: Reputation: 181Reputation: 181
To use functions like sqrt you need to add '-lm' to the linking options: Project->Project options...->Configure Options and then add the flag to 'Linker flags (LDFLAGS)'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Including header files and source files for classes Feenix Programming 8 09-28-2005 11:53 AM
KDevelop and resource files Cornholio Programming 4 03-17-2005 03:10 AM
How to write Makefile in 2.6 for including header files in another dir ? ashbalu Programming 0 10-19-2004 04:45 PM
Including files and permissions kidestranged Linux - General 2 07-27-2004 08:31 PM
SUSE 9.1: named.conf works, but including separate conf files doesn't??? registering Linux - Distributions 0 06-09-2004 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration