Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 6 of 6
  1. #1
    brahms is offline Registered User
    Join Date
    Dec 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BSD libs on Mac OS X

    Does anyone know where to locate some of the basic BSD libs for OS X? I'm trying to run make on some source but it requires libsocket.dynlib and libnsl.dynlib. Anyone know where we can get a version that works on OS X?

  2. #2
    anarchie is offline NSCoder
    Join Date
    Oct 2002
    Posts
    198
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm quite sure that both of those libraries are part of libc on OS X. Thus, you don't need to link in any extra libraries to use sockets or NSL. You could either modify the makefiles so they do not require those libraries, or create dummy libraries only so that the linker finds them.

  3. #3
    brahms is offline Registered User
    Join Date
    Dec 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks so much for the response. I modified the makefile so that it didn't try to link in the extra libraries, just the libc and libm. Unfortunately now I get an error from ld saying that _ftime is an undefined symbol. I'm going to look into that a little more. Thanks again for your response.

  4. #4
    anarchie is offline NSCoder
    Join Date
    Oct 2002
    Posts
    198
    Thanks
    0
    Thanked 0 Times in 0 Posts
    From the ftime(3) manpage:
    This interface is obsoleted by gettimeofday(2). It is available from the
    compatibility library, libcompat.
    You'll have to link in libcompat.

  5. #5
    brahms is offline Registered User
    Join Date
    Dec 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Couldn't fine libcompat, but it wasn't ftime that was failing, it was _ftime. I found that method in libcrypto. After linking that in everything ran smoothly. Thanks for the help all.

  6. #6
    anarchie is offline NSCoder
    Join Date
    Oct 2002
    Posts
    198
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just for the record, a symbol is formed by prefixing a C function with an underscore. So yes, the symbol _ftime corresponds to the C function ftime. I checked, and the documentation on ftime IS inconsistent - libcompat isn't on OS X. So, uh, for all of you who need ftime, it's in libcrypto. =O

 

 

Similar Threads

  1. A bit of nostalgia: A Salute to Mac OS X
    By simX in forum Apple News, Rumors & Discussion
    Replies: 31
    Last Post: March 24th, 2005, 06:45 AM
  2. HP Photosmart 1315 and USB Print Sharing
    By zwheeloc in forum Mac Classic System & Software
    Replies: 12
    Last Post: February 6th, 2003, 08:20 PM
  3. apps list
    By Mac Osxtopus in forum Mac OS X System & Mac Software
    Replies: 7
    Last Post: May 29th, 2002, 11:31 AM
  4. Apple: Forget XP, try the Mac
    By tagliatelle in forum Bob's Place
    Replies: 1
    Last Post: November 25th, 2001, 06:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •