login about faq

Sorry to ask, but I have a linking problem on Xcode 4.4 and the latest cocoa chilkat mail libraries.

I have a simple unlockcomponent and I get

Undefined symbols for architecture x86_64:
  "_res_9_query", referenced from:
      ChilkatResolve::mxLookup(char const, ScoredStrings&, LogBase&, bool) in libchilkatCocoa.a(ChilkatResolve.o)
      ChilkatResolve::dkimLookup(char const, StringBuffer&, LogBase&, bool) in libchilkatCocoa.a(ChilkatResolve.o)
      ChilkatResolve::bestMxLookup(char const*, StringBuffer&, LogBase&, bool) in libchilkatCocoa.a(ChilkatResolve.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I should perhaps link the -lresolv, -lpthread libraries but I don't know how to do this.

asked Aug 23 '12 at 17:32

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


One possible way of doing it is to right-click on the project and select "Add Files to XYZ", where XYZ is the name of your project.

Then navigate to the root of your hard drive, such as "Server HD", then navigate down such as:

Server HD-->Developer-->Platforms-->iPhoneOS.platform-->Developer-->SDKs-->iPhoneOS5.0.sdk-->usr-->lib and then select "libresolv.9.dylib"

Then try linking again.

link

answered Aug 23 '12 at 17:45

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

I just updated to the latest version of XCode (Version 4.5.1 (4G1004)) and this no longer seems to work. I get the error:

ld: library not found for -lresolv.9 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any ideas on how to fix this?

(Oct 06 '12 at 08:41) zenox
1

I added -lresolv to the other link flags. That fixed the problem.

(Oct 06 '12 at 09:42) zenox
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×10
×1

Asked: Aug 23 '12 at 17:32

Seen: 3,286 times

Last updated: Oct 06 '12 at 09:42

powered by OSQA