Mailing Lists: Apple Mailing Lists

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

Re: Zerolink and undefined symbol _main



On 11 Jun 2005, at 11:25 PM, Brad Peterson wrote:

I'm trying to build a framework with the zerolink
turned off, and I get the following error:

/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status

I should point out that with zerolink on, everything
builds just fine.

While the framework does use a few .a files, there are
no other dependencies, certainly not any other xcode
projects which would be built with zerolink on.

Targets that "build fine with ZeroLink on" are building fine because there is zero linkage phase, and hence there is no check for undefined symbols. It's like saying you never find you drive too fast when the speedometer is taped-over.


Observe the symbol the linker wants: _main. That's a C function, named main. Your target seems to think it is not a framework, but an application or a tool. What's the Wrapper Extension setting say?

    -- F

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

This email sent to email@hidden
References: 
 >Zerolink and undefined symbol _main (From: Brad Peterson <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.