Results 1 to 2 of 2
  1. #1
    C dynamic libraries with mac os x
    I'm a new mac user (I'm actually more used to work under unix, even though I'm far from being an expert).
    I would like to export some programs developped under linux to my mac, and I'm facing some problems.
    The problem itself seems rather simple...but since I don't have any background knowledge about how mac works, the task is not (at least for me :-) ) that easy.
    In brief I want to create a shared libraries from c files.

    For instance if I consider 2 C files in linux, I create the library by :
    - gcc -fPIC -c prog1.c
    - gcc -fPIC -c prog2.c
    - gcc -shared -o prog1.o prog2.o
    Then I just need to include in my LD_LIBRARY_PATH, and the headers prog1.h and prog2.h in my PATH.

    The problem with mac os X is that the -shared option can't be used...
    I guess the process is rather simple but I think I'll appreciate some help (please!!!!!).

    Thanks to the people who'll read this until the end...and thanks a lot to those who'll accept helping me!


  2. #2

    Member Since
    Aug 03, 2004
    piedro, you need to be using ``libtool -dynamic'' to build the .so files.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mac 2011 Word - Mail Merge Dynamic subject line
    By ccracs in forum OS X - Apps and Games
    Replies: 3
    Last Post: 06-29-2015, 03:39 PM
  2. creating dynamic libraries on MAC
    By bhatiaharsh in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 06-17-2011, 02:23 PM
  3. My Mac went from a static IP to a dynamic IP. Why?
    By Chocamine in forum OS X - Operating System
    Replies: 0
    Last Post: 04-28-2009, 04:15 AM
  4. Boost Libraries on the Mac
    By kittymaguire in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 09-18-2008, 09:43 AM
  5. HELP simple dynamic forms cannot be viewed with MAC
    By lisawebs in forum Web Design and Hosting
    Replies: 1
    Last Post: 10-22-2007, 09:38 PM

Posting Permissions

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