Re: 32-Bit Universal versus Standard 32/64-bit Universal
Re: 32-Bit Universal versus Standard 32/64-bit Universal
- Subject: Re: 32-Bit Universal versus Standard 32/64-bit Universal
- From: Fritz Anderson <email@hidden>
- Date: Thu, 11 Aug 2011 12:48:05 -0500
On 11 Aug 2011, at 12:08 PM, koko wrote:
> When I build my project as a 32-Bit Universal it compiles and links.
>
> When I build as a Standard 32/64-bit Universal I get three undefined symbols reported as:
>
> "_OBJC_IVAR_$_BMatrixCell.mBFilename", referenced from:
> "_OBJC_IVAR_$_BMatrix.fileList", referenced from:
> "_OBJC_IVAR_$_BMatrix.m_operationFileCount", referenced from:
>
> What in the 64-bit world would cause these to be undefined?
I see by Google that BMatrix and BMatrixCell are classes of your own. How do you declare them? In particular, are the ivars mentioned in the error messages @public, @protected, @package, @private, or untagged? How do you reference the instance variables (it appears you like to reference them directly, possibly from other classes)? What is your build setting for "Symbols Hidden by Default" (GCC_SYMBOLS_PRIVATE_EXTERN)?
I see this in the release notes for the 64-bit runtime <http://developer.apple.com/library/mac/#releasenotes/Cocoa/RN-ObjectiveC/_index.html>, found by Googling "objc 64 bit private ivar:"
> In 64-bit Objective-C, access control for classes and each class and instance variable has a symbol associated with it. All uses of a class or instance variable reference this symbol. These symbols are subject to access control by the linker.
>
> The upshot is that access to private classes and ivars is more strictly enforced. Illegal use of a private ivar may fail with a link error. Frameworks that provide classes and ivars must correctly export their symbols. In particular, frameworks built with -fvisibility=hidden or a linker export list may need to be changed.
...
> By default, ivar symbols for @private and @package ivars are not exported, and ivar symbols for @public and @protected ivars are exported. This can be changed by export lists, -fvisibility, or a visibility attribute on the class. Visibility attributes on individual ivars are currently not supported.
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden