Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dlopen woes under XCode 2.1



Hey, folks!

I've been using BSD dylibs as plugins in my cross-platform application (running under 10.4.1 & Win32). I've been loading them with dlopen(), and everything was fine.

Upon upgrading to XCode 2.1, they stopped working. They were no longer being recognized as loadable libs by dlopen. I had done something weird in XCode 1.5 to get them to work. I had created the targets as BSD dylibs, but then switched the Library Style setting to Bundle in the target settings for each plugin. If I didn't do this, I got weird random crashes in the plugins due to illegal instructions. For some reason changing the Library Style to Bundle fixed them, even though they weren't really OS X Bundles.

In XCode 2.1, dlopen refused to load them again, so I switched the Library Styles back to Dynamic. Now they're loading again, but the random crashes are back (although less than before).

I'm at a loss here. Can someone explain the proper way to build a dynamic library that can be used with dlopen?

I experimented briefly with using CFBundles (and a proper Carbon Bundle target), but CFBundleGetFunctionPointerForName can't find my exported C functions for some reason. Any suggestions would be very much appreciated.

-Sandy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Xcode Project File Format (From: Michael Rice <email@hidden>)
 >Re: Xcode Project File Format (From: Mike Lazear <email@hidden>)
 >Re: Xcode Project File Format (From: "Corey O'Connor" <email@hidden>)
 >Re: Xcode Project File Format (From: Scott Tooker <email@hidden>)
 >Re: Xcode Project File Format (From: Michael Rice <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.