Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link problem with custom static library



This is a convention that every other library on the system follows, so you would be wise not to fight it. If it's possible to get the linker to abandon its time-honored naming convention, then it won't be easy.

If your library is just for you own use, who cares what it's called? If it's for others' uses, then you should name it with the standard convention so they don't have to go through the same trouble you are right now :)

If you're just interested in accumulating a mass of sources into a linkable ball, you can look forward to upgrading to 10.4 and Xcode 2.2. They now include a "binary object" target type which can be named haphazardly and linked into another project outside of the usual "library" rules.

Daniel

On Nov 30, 2005, at 3:32 AM, Rustam Muginov wrote:

Hello all.
I am trying to link with custom static library (.a file) using xcode 1.5 under 10.3.9
The library does not have the "lib" prefix in its name, lets say it is called "MyLib.a"
Linker is not able to find it, reporting error "ld: can't locate file for: -lMyLib"
If i rename library to "libMyLib.a" in Finder, and re-add it to the project, then it is linked ok.
Could i make XCode not to require "lib" prefix to every library?
Thank you.


--
Sincerely,
	Rustam Muginov

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/jalkut%40red- sweater.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Link problem with custom static library (From: Rustam Muginov <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.