Re: Where to look for dynamic code loading
Re: Where to look for dynamic code loading
- Subject: Re: Where to look for dynamic code loading
- From: Shaun Wexler <email@hidden>
- Date: Thu, 2 Mar 2006 09:48:14 -0800
On Mar 2, 2006, at 6:51 AM, Jeff DuMonthier wrote:
Is this implemented in one target by adding the processor specific
options on a per file basis to the processor specific classes or do
you have to build them separately and load them from libraries at
run time?
No, you can compile all the code into one Universal Binary in your
plugin executable, and don't need to use plug-ins or dylibs. Wrap
each CPU-specific subclass with ifdefs, and be sure to place each
subclass in its own .cpp file (ie so the VSCR/VRSAVE isn't used in
the G3 version, etc).
--
Shaun Wexler
MacFOH
http://www.macfoh.com
/*---- file DSPEngine.h ----*/
class DSPEngine
public:
void doSomething();
/*--------------------------*/
/*--- file DSPEngine.cpp ---*/
void DSPEngine::doSomething() {
// std C implementation
}
/*--------------------------*/
/*--- file DSPEngineG3.h ---*/
class DSPEngineG3 : public DSPEngine
#if __ppc__
virtual void doSomething();
#endif
/*--------------------------*/
/*-- file DSPEngineG3.cpp --*/
#if __ppc__
void DSPEngineG3::doSomething() {}
#endif
/*--------------------------*/
/*--- file DSPEngineG4.h ---*/
class DSPEngineG4 : public DSPEngine
#if __ppc__ || __ppc7400__
virtual void doSomething();
#endif
/*--------------------------*/
/*-- file DSPEngineG4.cpp --*/
#if __ppc__ || __ppc7400__
void DSPEngineG4::doSomething() {}
#endif
/*--------------------------*/
/*--- file DSPEngineG5.h ---*/
class DSPEngineG5 : public DSPEngine
#if __ppc__ || __ppc64__
virtual void doSomething();
#endif
/*--------------------------*/
/*-- file DSPEngineG5.cpp --*/
#if __ppc__ || __ppc64__
void DSPEngineG5::doSomething() {}
#endif
/*--------------------------*/
/*-- file DSPEnginei386.h --*/
class DSPEnginei386 : public DSPEngine
#if __i386__
virtual void doSomething();
#endif
/*--------------------------*/
/*- file DSPEnginei386.cpp -*/
#if __i386__
void DSPEnginei386 ::doSomething() {}
#endif
/*--------------------------*/
_______________________________________________
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