[gmpi] Re: low level API - Abstract Factory summary

  • From: Jeff McClintock <jeffmcc@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Tue, 08 Feb 2005 14:53:21 +1300

Tim Hockin wrote:

When you compile the plugin on linux, how do you specify that that symbol is 'exported', visible from the 'outside'.

It's not static, and it hasn't been stripped, so it is visible. At least, that's how I have always used it.

So no special keyword like on windows?, I've now get something like this...

extern "C" {

EXPORT_THIS_SYMBOL

IUnknown* GetPluginFactory(void)
{
// snip
}
}

where EXPORT_THIS_SYMBOL is defined as blank on linux..

#if defined( WIN32 )
   #define EXPORT_THIS_SYMBOL __declspec (dllexport)
#else
   #define EXPORT_THIS_SYMBOL
#endif



..as to the factory being an object, or just a function. I'm not worried either way.
The reason I have a seperate instantiate() function was due to Paul saying..


"This recognizes the fundamental and critical
distinction between instantiating a plugin (at which time, the plugin
vendor is free to throw in hooks to do copy protection/license
checking if they choose to) and metadata querying, when they are not."

Best regards,
Jeff


---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: