10-28-2004, 03:10 PM #1piedroGuestC 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 libProg.so prog1.o prog2.o
Then I just need to include libProg.so 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!
10-29-2004, 06:39 AM #2
- Member Since
- Aug 03, 2004
piedro, you need to be using ``libtool -dynamic'' to build the .so files.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By ccracs in forum OS X - Apps and GamesReplies: 3Last Post: 06-29-2015, 03:39 PM
By bhatiaharsh in forum OS X - Development and DarwinReplies: 2Last Post: 06-17-2011, 02:23 PM
By Chocamine in forum OS X - Operating SystemReplies: 0Last Post: 04-28-2009, 04:15 AM
By kittymaguire in forum OS X - Development and DarwinReplies: 0Last Post: 09-18-2008, 09:43 AM
By lisawebs in forum Web Design and HostingReplies: 1Last Post: 10-22-2007, 09:38 PM