LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-02-2008, 05:31 PM   #1
int80
LQ Newbie
 
Registered: Nov 2007
Posts: 19

Rep: Reputation: 0
Compile problems with Ubuntu 8.10


I've been trying to compile this binary for two days solid now, and I can't figure it out. I reckon I'm missing some sort of DNS library, but I can't figure out what.

[CODE]
cc -O2 -Wall -c -pthread axfrtest.c
cc -O2 -Wall -c -pthread main.c
cc -O2 -Wall -c -pthread chkver.c
cc -O2 -Wall -c -pthread genver.c
cc -O2 -Wall -c -pthread vercmp.c
cc -O2 -Wall -c -pthread skiptodata.c
cc -O2 -Wall -c -pthread skipname.c
cc -O2 -Wall -c -pthread recurtest.c
cc -O2 -Wall -c -pthread report.c
cc -O2 -Wall -c -pthread vcheck.c
cc -O2 -Wall -c -pthread usage.c
cc -O2 -Wall -c -pthread vexit.c
cc -O2 -Wall -c -pthread spin.c
cc -O2 -Wall -o porkbind axfrtest.o main.o chkver.o genver.o vercmp.o skiptodata.o skipname.o recurtest.o report.o vcheck.o usage.o vexit.o spin.o -pthread || cc -O2 -Wall -o porkbind axfrtest.o main.o chkver.o genver.o vercmp.o skiptodata.o skipname.o recurtest.o report.o vcheck.o usage.o vexit.o spin.o -pthread -lresolv
main.o: In function `main':
main.c.text+0x2b3): undefined reference to `__res_query'
main.c.text+0x592): undefined reference to `__dn_expand'
skipname.o: In function `skipname':
skipname.c.text+0x3b): undefined reference to `__dn_expand'
recurtest.o: In function `recurtest':
recurtest.c.text+0x73): undefined reference to `__res_query'
vcheck.o: In function `vcheck':
vcheck.c.text+0xae): undefined reference to `__res_query'
collect2: ld returned 1 exit status[CODE]

Any help would be great..I can't put code tags on it for some reason either.
 
Old 11-02-2008, 05:49 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

You're exactly correct - you're missing the (DNS) resolver library. Add this to your link command:
Quote:
-lresolv
 
  


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
compile C in Ubuntu 8.04 lipun4u Ubuntu 4 10-24-2008 10:59 AM
How to compile a module on Ubuntu fuzzyBuzz Ubuntu 2 07-06-2007 09:55 AM
Compile a c++ program in Ubuntu 5.10 nuwandias Ubuntu 8 03-16-2007 12:55 PM
mplayerplug-in won't compile, Ubuntu 6.06 NeXuS_2006 Linux - Software 3 01-07-2007 11:38 PM
c++ compile problem under ubuntu heyinba0904 Programming 8 01-05-2007 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:44 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
Open Source Consulting | Domain Registration