| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
------------------------------
Message: 8
Date: Mon, 31 Jan 2005 12:29:10 -0800
From: Jeff Moore <email@hidden>
Subject: Re: Initializing static C++ class variable in a HAL plugin
problem (Modifi? par St?phane Letz)
To: CoreAudio API <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
C++ statics are loaded as the dyld that contains them is loaded and
prepped for usage. What is probably happening is that your ObjC code is
executing before the HAL has had a chance to load your plug-in.
Consequently, none of those static variables have been initialized yet.
On Jan 31, 2005, at 5:26 AM, Stéphane Letz wrote:
I'm using an Objective C framework that implement some initializing
code in its "load" method. This initializing code access a
AudioHardarePlugIn loaded by the HAL. This plug-in use static C++
class variables. It appears that the static C++ class variables are
not initialized properly.
I read in the following page that says "load " is executed before
main :
http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/gcc/
objective-c.html
Since "load" is called early, it seems that static C++ class
variables are not yet initialized.
I'm a bit confused : does the HAL plug-ins require some special linker
option to be used to be sure C++ class variables will be initialized?
Of is the problem in the fact that Objective C load method should not
be used this way?
--
Jeff Moore
Core Audio
Apple
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.