Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > libc for unix apps

libc for unix apps
Thread Tools
Fresh-Faced Recruit
Join Date: May 1999
Status: Offline
Reply With Quote
Mar 30, 2001, 11:24 AM
 
I'm trying to compile a UNIX app which is looking for libc. However, it cannot find it. I noticed that there is a /usr/lib/libc.dylib. Would I be able to use this library for linking? How do you link to libc?
     
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 30, 2001, 02:21 PM
 
There is no libc in OSX. It is integrated so get rid of any libc reference you have.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Mar 30, 2001, 03:00 PM
 
Yes, /usr/lib/libc.dylib is libc. dylib is the Darwin extension for a dynamic library - it's akin to .so on linux/bsd. I'm not sure if you have to specifically link against it, it might be linked against by default but provided for compatibility (like libm.dylib is, so you don't have to go -lm hunting in makefiles).

You would just link against it by passing -lc to the linker, if you need to.
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:54 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2