On 24 Jan 2011, at 10:39 AM, Mathieu Suen wrote:

> int
> main ()
> {
> int error;
> objc_loadModule ("Foundation", onLoad, &error);
> return EXIT_SUCCESS;
> }
> ----------objc-test.c----------
> 
> But the linker complain:
> 
> Undefined symbols:
> "_objc_loadModule", referenced from:
>     _main in ccX2yu3T.o
> ld: symbol(s) not found
> 
> I have compile it using the command:
> gcc objc-test.c -g -lobjc -o test

According to nm, the symbol objc_loadModule does not appear in libobjc.dylib in 
at least my installation of 10.6.6. The delta notes for 10.5 in the runtime 
reference says the function is deprecated. 

It doesn't show up in my copy of the 10.5 SDK, either, which I find strange. 
I'd think if it were merely deprecated, and certainly for backward 
compatibility, it should still be in the library.

The documentation says you should use NSBundle or dyld functions instead.

        — F

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to