site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Importance: Normal Howdy, I've spent a few hours trying to do somethin' very simple: I have a .dylib I created in Xcode (BSD Dynamic Library) that I want to use in a command-line program I am compilin' with gcc. How do I do this? The following page is the only help I've found on includin' a .dylib when using gcc: http://developer.apple.com/documentation/DeveloperTools/Conceptual/DynamicLi... Based on it, I am tryin': $ g++ main.cpp Lib.dylib -o test But I get the followin' errors: /usr/bin/ld: Undefined symbols: func() ... etc. The queer thing is, if I take .c and .h files from the Xcode project and compile 'em into a .dylib by hand, like so: $ g++ -dynamiclib Lib.c -o Lib.dylib Then I can compile my program just fine, as above! This solution ain't acceptable, however, because then the .dylib won't work with Maple11 worksheet for some reason. When I look at the build details in Xcode, I see all sortsa flags like like -fpascal-strings and -no_farm_animals but I have no idea why the same exact code compiled by Xcode works in Maple11 but not with my gcc-compiled program, but the gcc-compiled .dylib works with my gcc-compiled program but not Maple11! (Tarnation!) Any help will be 'ppreciated. Milford Brimdash (ps. usin' Xcode to write my command-line program is out, since when I right-click on "Link Binary with Libraries" and add the Lib.dylib, it then complains durin' build that "can't locate file for: -ILib") _________________________________________________________________ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWL... _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com