New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Creating shared objects (dylibs)


Post Reply New Thread Subscribe

 
Thread Tools
xwasp
Guest
 
Posts: n/a

On OS X 10.3.9, I can create shared objects using the
following commands:

Code:
cc -fPIC -c -o file1.o file1.c
cc -fPIC -c -o file2.o file2.c
cc -fPIC -c -o file3.o file3.c
libtool -dynamic -o libfile.dylib file1.o file2.o file3.o -lc
However, on any version of OS X 10.4, this fails with a linker
error:

Code:
ld: for architecture ppc
ld: Undefined symbols:
_printf$LDBLStub
libtool: internal link edit command failed
Any ideas?
QUOTE Thanks
xwasp
Guest
 
Posts: n/a

I should add that I don't have a 10.4 machine to experiment on.
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
Quote:
Originally Posted by xwasp
libtool -dynamic -o libfile.dylib file1.o file2.o file3.o -lc
Try changing the line to;
libtool -dynamic -lSystemStubs -o libfile.dylib file1.o file2.o file3.o -lc

I found that answer from Apple's macosx-dev list dated October 28, 2005.
QUOTE Thanks
xwasp
Guest
 
Posts: n/a

Thanks. I'll give it to my friend to try tonight.

A generic google search was most unhelpful. I'll check the
Apple lists in future.
QUOTE Thanks

Post Reply New Thread Subscribe


« Leopard uninstall | shell script xml »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting 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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Printing on a shared windows printer.... macmania Running Windows (or anything else) on your Mac 6 03-19-2010 06:52 PM
Help me figure out Front Row & shared music kaidomac OS X - Apps and Games 8 03-16-2009 07:47 AM
Shared Printers Disabling...Please Help!!!!! scubagal Internet, Networking, and Wireless 2 12-26-2004 07:25 PM
Upgrading PERL Forum Setup, MySQL, etc. ssotti OS X - Development and Darwin 0 11-29-2003 12:16 PM
Where is the shared folder??? frank Switcher Hangout 1 10-10-2003 05:56 PM

All times are GMT -4. The time now is 02:38 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?